dix: Use correct listener to deliver touch end events

This fixes an problem left in f682e0563f
due to an incorrect cherry-pick.

We must use old listener->listener to deliver the touch event. Otherwise
grab won't let the event through and the abovementioned commit has no
effect.

Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
This commit is contained in:
Povilas Kanapickas 2021-02-15 14:52:32 +02:00 committed by Peter Hutterer
parent 20c78f38a0
commit af17b5c499
1 changed files with 3 additions and 4 deletions

View File

@ -1480,10 +1480,6 @@ UpdateTouchesForGrab(DeviceIntPtr mouse)
if (ti->active &&
CLIENT_BITS(listener->listener) == grab->resource) {
listener->listener = grab->resource;
listener->level = grab->grabtype;
listener->window = grab->window;
if (grab->grabtype == CORE || grab->grabtype == XI ||
!xi2mask_isset(grab->xi2mask, mouse, XI_TouchBegin)) {
@ -1501,6 +1497,9 @@ UpdateTouchesForGrab(DeviceIntPtr mouse)
listener->type = TOUCH_LISTENER_GRAB;
}
listener->listener = grab->resource;
listener->level = grab->grabtype;
listener->window = grab->window;
listener->state = TOUCH_LISTENER_IS_OWNER;
if (listener->grab)