[gtk+] gdkwindow-wayland: Destroy the xdg roles before the wl_surface



commit 6926c6d9f803fcdf1dedbac7433508438e7c1c60
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Jun 19 15:10:01 2014 -0400

    gdkwindow-wayland: Destroy the xdg roles before the wl_surface
    
    Since the xdg roles are a special case of the surface, some compositors
    like Weston destroy them automatically when the wl_surface is destroyed.
    Thus, we need to destroy these first.

 gdk/wayland/gdkwindow-wayland.c |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index b8d341e..0367009 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -1075,6 +1075,17 @@ gdk_wayland_window_hide_surface (GdkWindow *window,
 
   if (impl->surface)
     {
+      if (impl->xdg_surface)
+        {
+          xdg_surface_destroy (impl->xdg_surface);
+          impl->xdg_surface = NULL;
+        }
+      else if (impl->xdg_popup)
+        {
+          xdg_popup_destroy (impl->xdg_popup);
+          impl->xdg_popup = NULL;
+        }
+
       if (!is_destroy)
         {
           wl_surface_attach (impl->surface, NULL, 0, 0);
@@ -1088,17 +1099,6 @@ gdk_wayland_window_hide_surface (GdkWindow *window,
           g_slist_free (impl->outputs);
           impl->outputs = NULL;
         }
-
-      if (impl->xdg_surface)
-        {
-          xdg_surface_destroy (impl->xdg_surface);
-          impl->xdg_surface = NULL;
-        }
-      else if (impl->xdg_popup)
-        {
-          xdg_popup_destroy (impl->xdg_popup);
-          impl->xdg_popup = NULL;
-        }
     }
 
   impl->mapped = FALSE;


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