gdk/wayland: Avoid grab crossing on idle tablets

Tablets require a tool in proximity to have an active surface
to send pointer events to. Avoid the grab-induced crossing events
on tablets that don't have a tool in proximity at the time of
creating the grab.

Fixes #1188, Fixes #3116

(cherry picked from commit d8919311b18bb0b89121c88405f757d6cee2e7cb)
This commit is contained in:
Yifan Zhu 2025-02-25 23:05:43 -08:00
parent 8365cdfe32
commit 4e005ec603

View File

@ -5029,7 +5029,8 @@ gdk_wayland_seat_grab (GdkSeat *seat,
{
GdkWaylandTabletData *tablet = l->data;
device_maybe_emit_grab_crossing (tablet->master, native, evtime);
if (tablet->current_tool)
device_maybe_emit_grab_crossing (tablet->master, native, evtime);
_gdk_display_add_device_grab (display,
tablet->master,