mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
Focus the no_focus_window if no suitable window is in the mru list (should
2004-09-15 Elijah Newren <newren@math.utah.edu> Focus the no_focus_window if no suitable window is in the mru list (should fix the almost contrived extra issue found in #147475) * doc/how-to-get-focus-right.txt: We no longer need to lie about only focusing panels upon explicit request. * src/workspace.c: (meta_workspace_focus_top_window): removed this function--it was more code than needed and was unreliable anyway, (meta_workspace_focus_mru_window): if a suitable window isn't in the mru list, focus the no_focus_window instead of calling focus_top_window.
This commit is contained in:
parent
b8b647e346
commit
cffe7e9566
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
||||
2004-09-15 Elijah Newren <newren@math.utah.edu>
|
||||
|
||||
Focus the no_focus_window if no suitable window is in the mru list
|
||||
(should fix the almost contrived extra issue found in #147475)
|
||||
|
||||
* doc/how-to-get-focus-right.txt: We no longer need to lie about
|
||||
only focusing panels upon explicit request.
|
||||
|
||||
* src/workspace.c: (meta_workspace_focus_top_window): removed this
|
||||
function--it was more code than needed and was unreliable anyway,
|
||||
(meta_workspace_focus_mru_window): if a suitable window isn't in
|
||||
the mru list, focus the no_focus_window instead of calling
|
||||
focus_top_window.
|
||||
|
||||
2004-09-15 Elijah Newren <newren@math.utah.edu>
|
||||
|
||||
Prevent focus inconsistencies by only providing one focus method
|
||||
|
@ -78,10 +78,7 @@ without using the mouse, for example, by grabs).
|
||||
Finally, windows of type WM_DOCK or WM_DESKTOP (e.g. the desktop and
|
||||
the panel) present a special case. For all focus modes, we only focus
|
||||
these windows if the user clicks on them or uses Ctrl-Alt-Tab to
|
||||
navigate to them. (Well, erm, actually they can be focused in click
|
||||
and sloppy focus modes if no other window besides these are found, but
|
||||
there shouldn't be any difference in behavior between doing this and
|
||||
focusing the designated "no_focus_window")
|
||||
navigate to them.
|
||||
|
||||
|
||||
|
||||
|
@ -31,8 +31,6 @@ void meta_workspace_queue_calc_showing (MetaWorkspace *workspace);
|
||||
static void set_active_space_hint (MetaScreen *screen);
|
||||
static void meta_workspace_focus_mru_window (MetaWorkspace *workspace,
|
||||
MetaWindow *not_this_one);
|
||||
static void meta_workspace_focus_top_window (MetaWorkspace *workspace,
|
||||
MetaWindow *not_this_one);
|
||||
|
||||
static void
|
||||
maybe_add_to_list (MetaScreen *screen, MetaWindow *window, gpointer data)
|
||||
@ -867,41 +865,10 @@ meta_workspace_focus_mru_window (MetaWorkspace *workspace,
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_topic (META_DEBUG_FOCUS, "No MRU window to focus found\n");
|
||||
meta_workspace_focus_top_window (workspace, not_this_one);
|
||||
}
|
||||
}
|
||||
|
||||
/* Focus top window on workspace */
|
||||
void
|
||||
meta_workspace_focus_top_window (MetaWorkspace *workspace,
|
||||
MetaWindow *not_this_one)
|
||||
{
|
||||
MetaWindow *window;
|
||||
|
||||
if (not_this_one)
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"Focusing top window excluding %s\n", not_this_one->desc);
|
||||
|
||||
window = meta_stack_get_default_focus_window (workspace->screen->stack,
|
||||
workspace,
|
||||
not_this_one);
|
||||
|
||||
/* FIXME I'm a loser on the CurrentTime front */
|
||||
if (window)
|
||||
{
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"Focusing top window %s\n", window->desc);
|
||||
|
||||
meta_window_focus (window,
|
||||
meta_topic (META_DEBUG_FOCUS, "No MRU window to focus found; focusing no_focus_window.\n");
|
||||
XSetInputFocus (workspace->screen->display->xdisplay,
|
||||
workspace->screen->display->no_focus_window,
|
||||
RevertToPointerRoot,
|
||||
meta_display_get_current_time (workspace->screen->display));
|
||||
|
||||
/* Also raise the window if in click-to-focus */
|
||||
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK)
|
||||
meta_window_raise (window);
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_topic (META_DEBUG_FOCUS, "No top window to focus found\n");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user