[gtk+] wayland: Avoid a crash with GtkGLArea



commit b64a0b923389fb719b6d8947973c834c0be315cb
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Sep 13 14:18:19 2015 -0400

    wayland: Avoid a crash with GtkGLArea
    
    We must not call gdk_wayland_window_attach_image when
    using GL for drawing, this leads to a crash.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=754770

 gdk/wayland/gdkwindow-wayland.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index d999753..4c6f30c 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -1289,7 +1289,8 @@ gdk_wayland_window_show (GdkWindow *window,
 
   _gdk_make_event (window, GDK_MAP, NULL, FALSE);
 
-  if (impl->cairo_surface)
+  if (impl->cairo_surface &&
+      _gdk_wayland_is_shm_surface (impl->cairo_surface))
     gdk_wayland_window_attach_image (window);
 }
 


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