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.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2283
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2518>
This commit is contained in:
Carlos Garnacho 2022-07-19 15:02:20 +02:00 committed by Marge Bot
parent b17a510309
commit 633635d608

View File

@ -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;