diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-09-21 16:56:28 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-09-23 19:29:41 +1000 |
commit | 61b4e88e01f32e976f85e7970a7f5b21fcd84f97 (patch) | |
tree | 0fbab0eae2597d25361e045516072043b9394dec | |
parent | 9ee70943ec304b08b8e4651c512a8e65fa13cc9c (diff) |
emuWheel: fix signed/unsigned screwup
This patch fixes wheel emulation on buttons other than 0.
Reported-by: Andy Neitzke
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | src/emuWheel.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/emuWheel.c b/src/emuWheel.c index 178b01b..e7b2f98 100644 --- a/src/emuWheel.c +++ b/src/emuWheel.c @@ -110,9 +110,11 @@ EvdevWheelEmuFilterMotion(InputInfoPtr pInfo, struct input_event *pEv) */ if (pEvdev->emulateWheel.button_state || !pEvdev->emulateWheel.button) { /* Just return if the timeout hasn't expired yet */ - if (pEvdev->emulateWheel.button && - pEvdev->emulateWheel.expires - GetTimeInMillis() > 0) { - return TRUE; + if (pEvdev->emulateWheel.button) + { + int ms = pEvdev->emulateWheel.expires - GetTimeInMillis(); + if (ms > 0) + return TRUE; } /* We don't want to intercept real mouse wheel events */ |