stack: Fix crash when opening a full-screen window

When mutter recognizes a full-screen window, it tries to raise it to the top
of the stack. Unfortunately, a recent rewrite of the stack code didn't do
well with raising a window to the top of the stack if the stack wasn't in
a consistent state -- it would crash. Ensure that the stack is in a consistent
state at the top of meta_stack_raise/meta_stack_lower.

https://bugzilla.redhat.com/show_bug.cgi?id=806437

https://bugzilla.gnome.org/show_bug.cgi?id=672797
This commit is contained in:
Jasper St. Pierre 2012-03-24 15:17:29 -03:00
parent 823208120d
commit 23046f6e28

View File

@ -189,7 +189,7 @@ meta_stack_raise (MetaStack *stack,
int max_stack_position = window->stack_position;
MetaWorkspace *workspace;
g_assert (stack->added == NULL);
stack_ensure_sorted (stack);
workspace = meta_window_get_workspace (window);
for (l = stack->sorted; l; l = l->next)
@ -217,7 +217,7 @@ meta_stack_lower (MetaStack *stack,
int min_stack_position = window->stack_position;
MetaWorkspace *workspace;
g_assert (stack->added == NULL);
stack_ensure_sorted (stack);
workspace = meta_window_get_workspace (window);
for (l = stack->sorted; l; l = l->next)