summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Matos <tiagomatos@gmail.com>2015-08-01 17:08:30 +0200
committerRui Matos <tiagomatos@gmail.com>2015-08-03 14:24:36 +0200
commit36263076b26453fcbda5a000de93e8ad64d7d85e (patch)
tree50821221bff0d19e26e48b4e4360ea0324b1e5b2
parent61ba7adfc8f1b3ec9ea8deb25d63ca5898f6559c (diff)
downloadgtk+-36263076b26453fcbda5a000de93e8ad64d7d85e.tar.gz
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
-rw-r--r--gdk/wayland/gdkwindow-wayland.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index deda194341..fd02480ed0 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;