[gtk+] wayland: Delay wl_subsurface interface creation until the window is shown



commit eaebc2cb4b8bae75e66c3f4b98b5ff9dc57ed6ba
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Feb 25 15:59:26 2015 +0100

    wayland: Delay wl_subsurface interface creation until the window is shown
    
    It isn't really necessary anytime before, so just make sure it's there only
    when the window is visible.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=743427

 gdk/wayland/gdkwindow-wayland.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index 3bfbea1..aa77641 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -877,9 +877,6 @@ gdk_wayland_window_create_surface (GdkWindow *window)
 
   gdk_wayland_window_sync_opaque_region (window);
   gdk_wayland_window_sync_input_region (window);
-
-  if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_SUBSURFACE)
-    gdk_wayland_window_create_subsurface (window);
 }
 
 static void
@@ -1214,6 +1211,9 @@ gdk_wayland_window_show (GdkWindow *window,
   if (!impl->surface)
     gdk_wayland_window_create_surface (window);
 
+  if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_SUBSURFACE)
+    gdk_wayland_window_create_subsurface (window);
+
   gdk_wayland_window_map (window);
 
   _gdk_make_event (window, GDK_MAP, NULL, FALSE);
@@ -1691,7 +1691,7 @@ gdk_wayland_window_set_transient_for (GdkWindow *window,
           impl->subsurface = NULL;
         }
 
-      if (parent)
+      if (parent && gdk_window_is_visible (window))
         gdk_wayland_window_create_subsurface (window);
     }
 }


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