mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
Raise the ancestor of a window instead of the window itself. Fixes
2005-02-12 Elijah Newren <newren@gmail.com> Raise the ancestor of a window instead of the window itself. Fixes #166894. * src/window.c: (find_root_ancestor): new function, (meta_window_raise): get the ancestor of the given window and raise it if possible instead of the window
This commit is contained in:
parent
9fa5c1d4b9
commit
0488efc8c1
@ -1,3 +1,12 @@
|
||||
2005-02-12 Elijah Newren <newren@gmail.com>
|
||||
|
||||
Raise the ancestor of a window instead of the window itself.
|
||||
Fixes #166894.
|
||||
|
||||
* src/window.c: (find_root_ancestor): new function,
|
||||
(meta_window_raise): get the ancestor of the given window and
|
||||
raise it if possible instead of the window
|
||||
|
||||
2005-02-12 Elijah Newren <newren@gmail.com>
|
||||
|
||||
Don't unconditionally place splashscreens (and other
|
||||
|
37
src/window.c
37
src/window.c
@ -3654,13 +3654,44 @@ meta_window_set_current_workspace_hint (MetaWindow *window)
|
||||
meta_error_trap_pop (window->display, FALSE);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
find_root_ancestor (MetaWindow *window,
|
||||
void *data)
|
||||
{
|
||||
MetaWindow **ancestor = data;
|
||||
|
||||
/* Overwrite the previously "most-root" ancestor with the new one found */
|
||||
*ancestor = window;
|
||||
|
||||
/* We want this to continue until meta_window_foreach_ancestor quits because
|
||||
* there are no more valid ancestors.
|
||||
*/
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
meta_window_raise (MetaWindow *window)
|
||||
{
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"Raising window %s\n", window->desc);
|
||||
MetaWindow *ancestor;
|
||||
ancestor = window;
|
||||
meta_window_foreach_ancestor (window, find_root_ancestor, &ancestor);
|
||||
|
||||
meta_stack_raise (window->screen->stack, window);
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"Raising window %s, ancestor of %s\n",
|
||||
ancestor->desc, window->desc);
|
||||
|
||||
if (window->screen->stack != ancestor->screen->stack)
|
||||
{
|
||||
meta_warning (
|
||||
"Either stacks aren't per screen or some window has a weird "
|
||||
"transient_for hint; window->screen->stack != "
|
||||
"ancestor->screen->stack. window = %s, ancestor = %s.\n",
|
||||
window->desc, ancestor->desc);
|
||||
/* Just punt and raise the window itself */
|
||||
meta_stack_raise (window->screen->stack, window);
|
||||
}
|
||||
else
|
||||
meta_stack_raise (window->screen->stack, ancestor);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user