[gimp/gtk3-port] app: the return value of gdk_device_get_has_cursor() has become meaningless



commit 738f92a3709026a4f28f3cd2fc0c3331195fd408
Author: Michael Natterer <mitch gimp org>
Date:   Sun May 20 17:27:44 2018 +0200

    app: the return value of gdk_device_get_has_cursor() has become meaningless
    
    so for now assume that all devices except floating ones move the
    pointer, and figure out the details once multiple masters actually
    exits.

 app/widgets/gimpdeviceinfo.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/app/widgets/gimpdeviceinfo.c b/app/widgets/gimpdeviceinfo.c
index 23a1cde..3847640 100644
--- a/app/widgets/gimpdeviceinfo.c
+++ b/app/widgets/gimpdeviceinfo.c
@@ -828,7 +828,19 @@ gimp_device_info_has_cursor (GimpDeviceInfo *info)
   g_return_val_if_fail (GIMP_IS_DEVICE_INFO (info), FALSE);
 
   if (info->device)
-    return gdk_device_get_has_cursor (info->device);
+    {
+      /*  this should really be
+       *
+       *  "is slave, *and* the associated master is gdk_seat_get_pointer()"
+       *
+       *  but who knows if future multiple masters will all have their
+       *  own visible pointer or not, and what the API for figuring
+       *  that will be, so for now let's simply assume that all
+       *  devices except floating ones move the pointer on screen.
+       */
+      return gdk_device_get_device_type (info->device) !=
+             GDK_DEVICE_TYPE_FLOATING;
+    }
 
   return FALSE;
 }


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