debian/changelog | 8 - debian/patches/505_Xi_ensure_replayed_touch_events_have_devices.patch | 35 ++++ debian/patches/506_Xi_ensure_touch_events_update_currentTime.patch | 27 +++ debian/patches/507_dix_Ensure_touch_events_are_delivered_to_next_client.patch | 76 ++++++++++ debian/patches/series | 3 5 files changed, 148 insertions(+), 1 deletion(-)
New commits: commit ecd32c97fa03dcc12a83c953b0653cc6a875ce92 Author: Chase Douglas <chase.doug...@ubuntu.com> Date: Wed Sep 7 09:43:19 2011 -0700 Add fixes for touch grab handling, courtesy of Carlos Garnacho * Add fixes for touch grab handling, courtesy of Carlos Garnacho - 505_Xi_ensure_replayed_touch_events_have_devices.patch - 506_Xi_ensure_touch_events_update_currentTime.patch - 507_dix_Ensure_touch_events_are_delivered_to_next_client.patch diff --git a/debian/changelog b/debian/changelog index dab2757..17f5df6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,7 +19,13 @@ xorg-server (2:1.10.4-1ubuntu1) UNRELEASED; urgency=low * debian/rules: Add check target invoking xvfb-run to test that it works * debian/control: Add build dependency on xauth, required by xvfb-run - -- Bryce Harrington <br...@ubuntu.com> Wed, 24 Aug 2011 19:39:26 -0700 + [ Chase Douglas ] + * Add fixes for touch grab handling, courtesy of Carlos Garnacho + - 505_Xi_ensure_replayed_touch_events_have_devices.patch + - 506_Xi_ensure_touch_events_update_currentTime.patch + - 507_dix_Ensure_touch_events_are_delivered_to_next_client.patch + + -- Chase Douglas <chase.doug...@ubuntu.com> Wed, 07 Sep 2011 09:40:03 -0700 xorg-server (2:1.10.4-1) unstable; urgency=low diff --git a/debian/patches/505_Xi_ensure_replayed_touch_events_have_devices.patch b/debian/patches/505_Xi_ensure_replayed_touch_events_have_devices.patch new file mode 100644 index 0000000..7e641bf --- /dev/null +++ b/debian/patches/505_Xi_ensure_replayed_touch_events_have_devices.patch @@ -0,0 +1,35 @@ +From a1535e63935e6453301e54efbc4c13dc11995b40 Mon Sep 17 00:00:00 2001 +From: Carlos Garnacho <carl...@gnome.org> +Date: Mon, 5 Sep 2011 17:25:54 +0200 +Subject: [PATCH 1/6] Xi: ensure replayed touch events have the right devices + set + +So update the event device/source to the TouchClientPtr ones +--- + Xi/exevents.c | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/Xi/exevents.c b/Xi/exevents.c +index 2f1a066..b8b9129 100644 +--- a/Xi/exevents.c ++++ b/Xi/exevents.c +@@ -1625,12 +1625,16 @@ ProcessTouchOwnership(DeviceIntPtr dev, TouchPointInfoPtr ti, uint8_t reason, + Bool ret; + + /* Deliver the saved touch begin event. */ ++ ti->begin_event->device_event.deviceid = tc->device->id; ++ ti->begin_event->device_event.sourceid = tc->source->id; + ret = DeliverOneTouchEvent(tc, ti, ti->begin_event); + + /* Deliver all the touch motion events in the ring buffer. */ + ev = ti->first_history; + while (ret && ev != ti->next_history) + { ++ ev->device_event.deviceid = tc->device->id; ++ ev->device_event.sourceid = tc->source->id; + ret = DeliverOneTouchEvent(tc, ti, ev); + + if (ev->any.type == ET_TouchEnd) +-- +1.7.5.4 + diff --git a/debian/patches/506_Xi_ensure_touch_events_update_currentTime.patch b/debian/patches/506_Xi_ensure_touch_events_update_currentTime.patch new file mode 100644 index 0000000..36022b4 --- /dev/null +++ b/debian/patches/506_Xi_ensure_touch_events_update_currentTime.patch @@ -0,0 +1,27 @@ +From 071c0d19396be0a12d9e2300d6fa2667ad6f032e Mon Sep 17 00:00:00 2001 +From: Carlos Garnacho <carl...@gnome.org> +Date: Mon, 5 Sep 2011 17:36:06 +0200 +Subject: [PATCH 2/6] Xi: Ensure touch events update currentTime + +This is so grabs initiated by touch events don't check +against a possibly outdated currentTime, and appear to +be in the future while they actually aren't. +--- + Xi/exevents.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/Xi/exevents.c b/Xi/exevents.c +index b8b9129..d445c9a 100644 +--- a/Xi/exevents.c ++++ b/Xi/exevents.c +@@ -1924,6 +1924,7 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device) + DeviceEvent *event = &ev->device_event; + + CHECKEVENT(ev); ++ UpdateCurrentTimeIf(); + + if (ev->any.type == ET_RawKeyPress || + ev->any.type == ET_RawKeyRelease || +-- +1.7.5.4 + diff --git a/debian/patches/507_dix_Ensure_touch_events_are_delivered_to_next_client.patch b/debian/patches/507_dix_Ensure_touch_events_are_delivered_to_next_client.patch new file mode 100644 index 0000000..3c65230 --- /dev/null +++ b/debian/patches/507_dix_Ensure_touch_events_are_delivered_to_next_client.patch @@ -0,0 +1,76 @@ +From 4b97bab5bfaf823c9c71b828bfb263a995c11cb7 Mon Sep 17 00:00:00 2001 +From: Carlos Garnacho <carl...@gnome.org> +Date: Mon, 5 Sep 2011 18:35:25 +0200 +Subject: [PATCH 3/6] dix: Ensure touch events are delivered to the next + client + +ComputeFreezes() would start over in the touch clients stack +every time it would replay touch events with the PointerEmulated +flag set. Instead, check the next touch client to forward ownership +to. +--- + dix/events.c | 32 ++++++++++++++++++-------------- + 1 files changed, 18 insertions(+), 14 deletions(-) + +diff --git a/dix/events.c b/dix/events.c +index cb329e7..5ded834 100644 +--- a/dix/events.c ++++ b/dix/events.c +@@ -4149,27 +4149,24 @@ CheckDeviceGrabs(DeviceIntPtr device, DeviceEvent *event, WindowPtr ancestor) + touch_event = &qe->event->device_event; + } + +- for (; i < device->spriteInfo->sprite->spriteTraceGood; i++) ++ /* Touch grabs are checked before pointer grabs. When a touch grab ++ * should be checked first, check_grab is TRUE. */ ++ if (touch_event) + { +- pWin = device->spriteInfo->sprite->spriteTrace[i]; +- +- if (!pWin->optional) +- continue; ++ TouchPointInfoPtr ti = touch_event->touchpoint; ++ TouchClientPtr tc = &ti->clients[ti->owner]; ++ GrabPtr grab; + +- /* Touch grabs are checked before pointer grabs. When a touch grab +- * should be checked first, check_grab is TRUE. */ +- if (touch_event && touch_event->check_grab) ++ if (ti->owner >= 0 && touch_event->check_grab) + { +- GrabPtr grab; ++ tc = &ti->clients[ti->owner]; ++ pWin = tc->window; + + grab = CheckPassiveGrabsOnWindow(pWin, device, + (InternalEvent *)touch_event, + FALSE, FALSE); + if (grab) + { +- TouchPointInfoPtr ti = touch_event->touchpoint; +- TouchClientPtr tc = &ti->clients[ti->owner]; +- + device->deviceGrab.ActivateGrab(device, grab, currentTime, + TRUE); + touch_event->check_grab = FALSE; +@@ -4178,8 +4175,15 @@ CheckDeviceGrabs(DeviceIntPtr device, DeviceEvent *event, WindowPtr ancestor) + } + } + +- if (touch_event) +- touch_event->check_grab = TRUE; ++ touch_event->check_grab = TRUE; ++ } ++ ++ for (; i < device->spriteInfo->sprite->spriteTraceGood; i++) ++ { ++ pWin = device->spriteInfo->sprite->spriteTrace[i]; ++ ++ if (!pWin->optional) ++ continue; + + if (pWin->optional && + CheckPassiveGrabsOnWindow(pWin, device, (InternalEvent *)event, +-- +1.7.5.4 + diff --git a/debian/patches/series b/debian/patches/series index cbe2d9e..cd52d60 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -36,3 +36,6 @@ 502_gestures-extension.patch 503_fix_masked_transformed_valuators.patch 504_fix_no_coords.patch +505_Xi_ensure_replayed_touch_events_have_devices.patch +506_Xi_ensure_touch_events_update_currentTime.patch +507_dix_Ensure_touch_events_are_delivered_to_next_client.patch -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1r1may-00039f...@vasks.debian.org