[gtk+] wayland: Don't try and reset the pointer window grab if there wasn't one



commit 99e0f4b62cb0c730b40e352f632cd30256cb4817
Author: Rob Bradford <rob linux intel com>
Date:   Mon Mar 5 19:35:38 2012 +0000

    wayland: Don't try and reset the pointer window grab if there wasn't one

 gdk/wayland/gdkdevice-wayland.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index 9e8e6b1..1d6d044 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -279,9 +279,10 @@ gdk_device_core_ungrab (GdkDevice *device,
       if (grab)
         grab->serial_end = grab->serial_start;
 
-      _gdk_wayland_window_set_device_grabbed (wayland_device->pointer_grab_window,
-                                              NULL,
-                                              0);
+      if (wayland_device->pointer_grab_window)
+        _gdk_wayland_window_set_device_grabbed (wayland_device->pointer_grab_window,
+                                                NULL,
+                                                0);
     }
 }
 



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