[mutter] stack: Fix crash when opening a full-screen window



commit 23046f6e28081fd41a1303a88420f9973abcb705
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sat Mar 24 15:17:29 2012 -0300

    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

 src/core/stack.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/core/stack.c b/src/core/stack.c
index 5c31cdf..47f51b2 100644
--- a/src/core/stack.c
+++ b/src/core/stack.c
@@ -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)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]