[mutter/wip/carlosg/x11-tablet-cursors-42] backend: Fix cursor visibility on X11 with only tablets as input




commit d1b20939ae325ff17556ece68e139bac743b9cd6
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Jul 19 15:02:20 2022 +0200

    backend: Fix cursor visibility on X11 with only tablets as input
    
    Since tablets on X11 drive the Virtual Core Pointer as every other
    pointing device, we should consider it as a pointer device when
    determining whether the pointer cursor should be visible.
    
    Fixes the cursor being hidden if there are only tablets for input.
    
    (cherry-picked from commit 633635d608dbc503f73c5425dec8015bfdcae637)

 src/backends/meta-backend.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/backends/meta-backend.c b/src/backends/meta-backend.c
index cf6a04943e..84ea48442a 100644
--- a/src/backends/meta-backend.c
+++ b/src/backends/meta-backend.c
@@ -417,7 +417,12 @@ determine_hotplug_pointer_visibility (ClutterSeat *seat)
       if (device_type == CLUTTER_TABLET_DEVICE ||
           device_type == CLUTTER_PEN_DEVICE ||
           device_type == CLUTTER_ERASER_DEVICE)
-        has_tablet = TRUE;
+        {
+          if (meta_is_wayland_compositor ())
+            has_tablet = TRUE;
+          else
+            has_pointer = TRUE;
+        }
     }
 
   return has_pointer && !has_touchscreen && !has_tablet;


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