mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-03-24 01:34:04 +00:00
Fix relative events with swapped axes
After we swap the axes, we only call valuator_mask_set for axes that are not zero, so we need to unset the axes that became zero when swapped. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
committed by
Peter Hutterer
parent
8d6dfd13b0
commit
7909975b0b
@@ -408,6 +408,10 @@ EvdevProcessValuators(InputInfoPtr pInfo)
|
||||
tmp = pEvdev->delta[REL_X];
|
||||
pEvdev->delta[REL_X] = pEvdev->delta[REL_Y];
|
||||
pEvdev->delta[REL_Y] = tmp;
|
||||
if (pEvdev->delta[REL_X] == 0)
|
||||
valuator_mask_unset(pEvdev->vals, REL_X);
|
||||
if (pEvdev->delta[REL_Y] == 0)
|
||||
valuator_mask_unset(pEvdev->vals, REL_Y);
|
||||
}
|
||||
if (pEvdev->invert_x)
|
||||
pEvdev->delta[REL_X] *= -1;
|
||||
|
||||
Reference in New Issue
Block a user