[mutter] If enabling a compositor with existing windows, set them visible as necessary



commit 78092a404f60c1c8fd0d46021c6f0936ba6118d5
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Tue Aug 17 15:02:07 2010 -0400

    If enabling a compositor with existing windows, set them visible as necessary
    
    When a compositor is present, we keep the visibility state of the
    compositor windows in sync with window->visible_to_compositor. We need
    to do the same when enabling the compositor.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=613124

 src/core/screen.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/core/screen.c b/src/core/screen.c
index 1dbd982..1bb0e1c 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -978,7 +978,15 @@ meta_screen_composite_all_windows (MetaScreen *screen)
   windows = meta_display_list_windows (display,
                                        META_LIST_INCLUDE_OVERRIDE_REDIRECT);
   for (tmp = windows; tmp != NULL; tmp = tmp->next)
-    meta_compositor_add_window (display->compositor, tmp->data);
+    {
+      MetaWindow *window = tmp->data;
+
+      meta_compositor_add_window (display->compositor, window);
+      if (window->visible_to_compositor)
+        meta_compositor_show_window (display->compositor, window,
+                                     META_COMP_EFFECT_NONE);
+    }
+
   g_slist_free (windows);
   
   /* initialize the compositor's view of the stacking order */



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