mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-05 11:08:15 +02:00
Accept touch sequence for pointer listener after second event delivery
This is a bit of unimplemented code for touchscreen pointer emulation. A
pointer grabbing client currently never accepts the touch sequence. The
sequence must be accepted once any touch-derived event is irrevocably
delivered to a client.
The first pointer event, derived from a touch begin event, may be caught
in a sync grab and then replayed. This is essentially a revocable
delivery of an event. Thus, we must wait till a non-begin event is
delivered.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit cacdb9a740)
This commit is contained in:
parent
2bb2eeb05c
commit
0dea2b1c93
1 changed files with 6 additions and 0 deletions
|
|
@ -1466,6 +1466,12 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
|||
if (!deliveries)
|
||||
DeliverOneGrabbedEvent(ptrev, dev, grab->grabtype);
|
||||
|
||||
/* We must accept the touch sequence once a pointer listener has
|
||||
* received one event past ButtonPress. */
|
||||
if (deliveries && ev->any.type != ET_TouchBegin &&
|
||||
!(ev->device_event.flags & TOUCH_CLIENT_ID))
|
||||
TouchListenerAcceptReject(dev, ti, 0, XIAcceptTouch);
|
||||
|
||||
if (ev->any.type == ET_TouchEnd &&
|
||||
!dev->button->buttonsDown &&
|
||||
dev->deviceGrab.fromPassiveGrab && GrabIsPointerGrab(grab)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue