Lower a window and all its transients as a unit

It's strange to leave transients windows around, after ancestor window was
lowered and unfocused.
https://bugzilla.gnome.org/show_bug.cgi?id=612726
This commit is contained in:
Maxim Ermilov 2010-09-11 05:00:15 +04:00
parent 0d51d9e4cf
commit bb1ab0afd9

View File

@ -260,15 +260,14 @@ meta_core_user_raise (Display *xdisplay,
meta_window_raise (window); meta_window_raise (window);
} }
void static gboolean
meta_core_user_lower_and_unfocus (Display *xdisplay, lower_window_and_transients (MetaWindow *window,
Window frame_xwindow, gpointer data)
guint32 timestamp)
{ {
MetaWindow *window = get_window (xdisplay, frame_xwindow);
meta_window_lower (window); meta_window_lower (window);
meta_window_foreach_transient (window, lower_window_and_transients, NULL);
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK && if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK &&
meta_prefs_get_raise_on_click ()) meta_prefs_get_raise_on_click ())
{ {
@ -296,8 +295,22 @@ meta_core_user_lower_and_unfocus (Display *xdisplay,
} }
} }
/* focus the default window, if needed */ return FALSE;
if (window->has_focus) }
void
meta_core_user_lower_and_unfocus (Display *xdisplay,
Window frame_xwindow,
guint32 timestamp)
{
MetaWindow *window = get_window (xdisplay, frame_xwindow);
lower_window_and_transients (window, NULL);
/* Rather than try to figure that out whether we just lowered
* the focus window, assume that's always the case. (Typically,
* this will be invoked via keyboard action or by a mouse action;
* in either case the window or a modal child will have been focused.) */
meta_workspace_focus_default_window (window->screen->active_workspace, meta_workspace_focus_default_window (window->screen->active_workspace,
NULL, NULL,
timestamp); timestamp);