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>
This commit is contained in:
parent
447fe7a1a7
commit
cacdb9a740
|
@ -1466,6 +1466,12 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
||||||
if (!deliveries)
|
if (!deliveries)
|
||||||
DeliverOneGrabbedEvent(ptrev, dev, grab->grabtype);
|
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 &&
|
if (ev->any.type == ET_TouchEnd &&
|
||||||
!dev->button->buttonsDown &&
|
!dev->button->buttonsDown &&
|
||||||
dev->deviceGrab.fromPassiveGrab && GrabIsPointerGrab(grab)) {
|
dev->deviceGrab.fromPassiveGrab && GrabIsPointerGrab(grab)) {
|
||||||
|
|
Loading…
Reference in New Issue