mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-03-24 09:44:28 +00:00
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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user