summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2010-06-01 12:21:00 +0200
committerCarlos Garnacho <carlosg@gnome.org>2010-06-02 01:09:48 +0200
commitc9ef62a57565e85c3c7656b5defad73f8927e377 (patch)
treed0f2a38300051473a02e4816e47643949e692f8d
parent71322a6079f4d7e08a215bcc09c27e158f56bcd0 (diff)
Prevent a device to handle several MT events.
pSubdevInfo->distance should be set to MAXINT, so the condition should initially be always true for all subdevs, if an already used device is chosen, that check ensures that it only gets assigned to the closest event.
-rw-r--r--src/evdev.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 30f28d6..b18b898 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -828,11 +828,11 @@ EvdevPostMTMotionEvents(InputInfoPtr pInfo, struct input_event *ev)
if (subdev_map[j] == pSubdevInfo)
subdev_map[j] = NULL;
}
- }
- subdev_map[i] = pSubdevInfo;
- pSubdevInfo->distance = distance;
- pSubdevInfo->id = id;
+ subdev_map[i] = pSubdevInfo;
+ pSubdevInfo->distance = distance;
+ pSubdevInfo->id = id;
+ }
}
/* Go through MT events which don't have a subdev