Commit 96d8df5b authored by Chase Douglas's avatar Chase Douglas Committed by Peter Hutterer

Update device state including when touch record does not exist

If a touch is physically active, the pointer core state should reflect
that the first button is pressed. Currently, this only occurs when there
are active listeners of the touch sequence. By moving the device state
updating to the beginning of touch processing we ensure it is updated
according to the processed physical state no matter what.
Signed-off-by: default avatarChase Douglas <>
Reviewed-by: Peter Hutterer's avatarPeter Hutterer <>
(cherry picked from commit a986f2f3)
parent a9dbdb49
......@@ -1597,6 +1597,9 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev)
touchid = ev->device_event.touchid;
if (emulate_pointer)
UpdateDeviceState(dev, &ev->device_event);
if (type == ET_TouchBegin) {
ti = TouchBeginTouch(dev, ev->device_event.sourceid, touchid,
......@@ -1996,9 +1999,6 @@ DeliverTouchEvents(DeviceIntPtr dev, TouchPointInfoPtr ti,
DeliverTouchEvent(dev, ti, ev, listener, client, win, grab, mask);
if (ti->emulate_pointer)
UpdateDeviceState(dev, &ev->device_event);
......@@ -364,14 +364,6 @@ TouchEndTouch(DeviceIntPtr dev, TouchPointInfoPtr ti)
if (ti->emulate_pointer) {
GrabPtr grab;
DeviceEvent ev;
memset(&ev, 0, sizeof(ev));
ev.type = ET_TouchEnd;
ev.detail.button = 1;
ev.touchid = ti->client_id;
UpdateDeviceState(dev, &ev);
if ((grab = dev->deviceGrab.grab)) {
if (dev->deviceGrab.fromPassiveGrab &&
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment