[gtk+] wayland: Invalidate our gtk_surface when we're unmapped



commit 36263076b26453fcbda5a000de93e8ad64d7d85e
Author: Rui Matos <tiagomatos gmail com>
Date:   Sat Aug 1 17:08:30 2015 +0200

    wayland: Invalidate our gtk_surface when we're unmapped
    
    Otherwise if we get mapped again we'll try to use an invalid
    gtk_surface and the compositor will disconnect us.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=753138

 gdk/wayland/gdkwindow-wayland.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index deda194..fd02480 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -1349,6 +1349,12 @@ gdk_wayland_window_hide_surface (GdkWindow *window)
           _gdk_frame_clock_thaw (gdk_window_get_frame_clock (window));
         }
 
+      if (impl->gtk_surface)
+        {
+          gtk_surface_destroy (impl->gtk_surface);
+          impl->gtk_surface = NULL;
+        }
+
       wl_surface_destroy (impl->surface);
       impl->surface = NULL;
 



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