[mutter/wayland] window: Ensure that visible_to_compositor is set when unmanaging



commit ed9dbf6aa241e9283d4009cfd384cbf51bb596aa
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Mar 28 13:51:34 2014 -0400

    window: Ensure that visible_to_compositor is set when unmanaging
    
    visible_to_compositor should always be in sync with show_window /
    hide_window calls, even when unmananging.
    
    This fixes a crash where we call sync_window_state when the window
    is unmanaging, since we use visible_to_compositor to determine whether
    the compositor will crash.
    
    This is actually wrong; we should be using the knowledge about
    whether we have called add_window / remove_window. We'll introduce
    this with a new boolean next time.

 src/core/window.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index c70993c..2905023 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -1469,8 +1469,11 @@ meta_window_unmanage (MetaWindow  *window,
     meta_wayland_surface_window_unmanaged (window->surface);
 
   if (window->visible_to_compositor)
-    meta_compositor_hide_window (window->display->compositor, window,
-                                 META_COMP_EFFECT_DESTROY);
+    {
+      window->visible_to_compositor = FALSE;
+      meta_compositor_hide_window (window->display->compositor, window,
+                                   META_COMP_EFFECT_DESTROY);
+    }
 
   meta_compositor_remove_window (window->display->compositor, window);
 


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