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>
This commit is contained in:
Peter Hutterer
2009-09-21 16:56:28 +10:00
parent 9ee70943ec
commit 61b4e88e01

View File

@@ -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 */