mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-09 20:24:14 +00:00
[client] x11: Find and use the correct valuators for mouse axes
Using the first two valuators present in the event is incorrect. Events with only one valuator set, such as those sent by the Xorg evdev driver when the mouse moved along one axis only, were being discarded. On the other hand, mice with multiple scroll wheels may be able to emit events with two scroll wheel valuators set. The XInput2 specification is light on details, but "Rel X" and "Rel Y" appear to be the de facto standard names for the motion valuators. If valuators with those labels are not found, fall back to using valuators with numbers 0 and 1.
This commit is contained in:

committed by
Geoffrey McRae

parent
d74307223f
commit
358515f4a8
@@ -38,6 +38,8 @@ struct X11DSState
|
||||
|
||||
int pointerDev;
|
||||
int keyboardDev;
|
||||
int xValuator;
|
||||
int yValuator;
|
||||
|
||||
bool pointerGrabbed;
|
||||
bool keyboardGrabbed;
|
||||
|
Reference in New Issue
Block a user