[gtk+/xi2: 1141/1239] GdkDeviceXI2: Avoid setting cursor on non-master devices.



commit ce5f80baae61e60d0483f4084fba0485c08c42be
Author: Carlos Garnacho <carlos gnome org>
Date:   Tue Sep 15 10:26:10 2009 +0200

    GdkDeviceXI2: Avoid setting cursor on non-master devices.

 gdk/x11/gdkdevice-xi2.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gdk/x11/gdkdevice-xi2.c b/gdk/x11/gdkdevice-xi2.c
index 7bc1c68..1612935 100644
--- a/gdk/x11/gdkdevice-xi2.c
+++ b/gdk/x11/gdkdevice-xi2.c
@@ -183,6 +183,10 @@ gdk_device_xi2_set_window_cursor (GdkDevice *device,
 
   priv = GDK_DEVICE_XI2_GET_PRIVATE (device);
 
+  /* Non-master devices don't have a cursor */
+  if (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_MASTER)
+    return;
+
   if (cursor)
     {
       cursor_private = (GdkCursorPrivate*) cursor;



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