mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-09 21:18:18 +02:00
xwayland: Do not use pointer crossing count for slave devices
Commit0e08e5083("xwayland: prevent X11 get enter event when pointer is over Wayland client") introduced a pointer crossing count to avoid sending spurious pointer enter events when the pointer is within a Wayland native surface. However, that change breaks tablet devices, as the pointer enter count is only updated from the wl_pointer enter/leave events, a slave X11 device such as a tablet pointer would report a lost focus and the event wrongly sent to the root window. To avoid the issue, revert partially commit0e08e5083to return FALSE as before for the slave devices. The rest of the logic from commit0e08e5083remains unchanged, so that we do not send spurious XCrossingEvents for the pointer device when it's within a native Wayland surface. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Closes: https://gitlab.freedesktop.org/xorg/xserver/-/work_items/1884 (cherry picked from commitc39b1591b2) Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2179>
This commit is contained in:
parent
03228e0020
commit
0ca92fb4be
1 changed files with 2 additions and 2 deletions
|
|
@ -3214,14 +3214,14 @@ sprite_check_lost_focus(SpritePtr sprite, WindowPtr window)
|
|||
pointer_crossing = (xwl_seat->pointer_enter_count > 0);
|
||||
master = GetMaster(device, POINTER_OR_FLOAT);
|
||||
if (!master || !master->lastSlave)
|
||||
return !pointer_crossing;
|
||||
return FALSE;
|
||||
|
||||
/* We do want the last active slave, we only check on slave xwayland
|
||||
* devices so we can find out the xwl_seat, but those don't actually own
|
||||
* their sprite, so the match doesn't mean a lot.
|
||||
*/
|
||||
if (master->lastSlave != get_pointer_device(xwl_seat))
|
||||
return !pointer_crossing;
|
||||
return FALSE;
|
||||
|
||||
if (xwl_seat->focus_window != NULL &&
|
||||
xwl_seat->cursor_confinement_window != NULL &&
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue