summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@canonical.com>2011-01-24 11:41:01 -0500
committerChase Douglas <chase.douglas@canonical.com>2011-01-24 13:00:16 -0500
commitf2f222c63fb1a02a4beffe2a3c6d78ddbe8cd626 (patch)
treeeedff5e70b7ac57e7e5122af8fa9929e466dfaa6
parentc7998a07e8751146e9ed4e09b0dc7013b6406afd (diff)
Only post touch events if there's a changemultitouch
In the slotted protocol the slot may change where the old slot isn't active. The only way to tell is to check for any changes in any state. Check the state before queueing a touch event to prevent spurious touches from reaching the server. Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
-rw-r--r--src/evdev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 8e2df7d..1915e98 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -640,7 +640,9 @@ EvdevProcessTouch(InputInfoPtr pInfo)
{
EvdevPtr pEvdev = pInfo->private;
- if (pEvdev->cur_slot < 0 || !pEvdev->mt_vals)
+ if (pEvdev->cur_slot < 0 || !pEvdev->mt_vals ||
+ (!pEvdev->open_slot && !pEvdev->close_slot &&
+ valuator_mask_num_valuators(pEvdev->mt_vals) == 0))
return;
if (pEvdev->close_slot) {