summaryrefslogtreecommitdiff
path: root/dix/touch.c
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@canonical.com>2012-03-07 16:06:27 -0800
committerPeter Hutterer <peter.hutterer@who-t.net>2012-03-22 11:33:20 +1000
commit31df08a449cf9b6e1740e1c02257997490630d93 (patch)
tree21ae406f9377f856409ae20ee71687c10a2f4def /dix/touch.c
parent58427e08a4a36ce9e213e4b4fe5249d5db2c764d (diff)
Use a new sprite trace for indirect touches when all touches have physically ended
All touches of an indirect device, such as a trackpad, are sent to the same window set. When there are no active touches, a new window set is created; otherwise, the window set of an existing touch is copied. The current code checks for any logically active touches. This includes touches that have physically ended but are still logically active due to unhandled touch grabs. Instead, we want a new window set whenever there are no physically active touches. This change skips over logically active but pending end touches, which are touches that have physically ended. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'dix/touch.c')
-rw-r--r--dix/touch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dix/touch.c b/dix/touch.c
index 5d7132ec9..0829b6545 100644
--- a/dix/touch.c
+++ b/dix/touch.c
@@ -510,7 +510,8 @@ TouchBuildDependentSpriteTrace(DeviceIntPtr dev, SpritePtr sprite)
/* All touches should have the same sprite trace, so find and reuse an
* existing touch's sprite if possible, else use the device's sprite. */
for (i = 0; i < t->num_touches; i++)
- if (t->touches[i].sprite.spriteTraceGood > 0)
+ if (!t->touches[i].pending_finish &&
+ t->touches[i].sprite.spriteTraceGood > 0)
break;
if (i < t->num_touches)
srcsprite = &t->touches[i].sprite;