mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-03-24 18:04:00 +00:00
If scrollwheels are found, bump the button number by 4 (or up to 7).
Scrollwheel data is always posted as buttons, so we need to advertise at least enough buttons to accommodate for 6/7 (horizontal wheel). Note that this may mean that if you have a device that has scroll wheels and axes, but no buttons, it may be interpreted as a mouse. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
@@ -1450,6 +1450,11 @@ EvdevProbe(InputInfoPtr pInfo)
|
||||
TestBit(REL_HWHEEL, pEvdev->rel_bitmask)) {
|
||||
xf86Msg(X_INFO, "%s: Found scroll wheel(s)\n", pInfo->name);
|
||||
has_scroll = TRUE;
|
||||
if (!num_buttons)
|
||||
xf86Msg(X_INFO, "%s: Forcing buttons for scroll wheel(s)\n",
|
||||
pInfo->name);
|
||||
num_buttons = (num_buttons < 3) ? 7 : num_buttons + 4;
|
||||
pEvdev->buttons = num_buttons;
|
||||
}
|
||||
|
||||
if (TestBit(ABS_X, pEvdev->abs_bitmask) &&
|
||||
|
||||
Reference in New Issue
Block a user