there seems to be an issue that with too many registered events some window
manager cannot recognize the device as input device with systemd 247.
PixlOne#166
Fixes#166
Starting with systemd 247 (?), desktop environments fail to recognize
the virtual input device if it has too many enabled libinput events.
It seems like KEY_ROTATE_LOCK_TOGGLE as the highest enabled event is a
good limit. This is the highest evdev event mapped by xkb, so the
usefulness higher events is limited, anyways.
This commit allows HiresScroll (when target is true) to map the up and
down events to gestures that support it (i.e.AxisGesture/
IntervalGesture). This check is done by checking if wheelCompatibility()
is true.
This also allows hires scroll events to send low-res scroll events as
well.
TODO: Fix bug w/ Chromium (and some other programs?) where mapping
scroll wheel to REL_WHEEL_HI_RES will cause the program to skip events
occassionally. I have literally been stuck on this bug for a week and I
still don't know what causes it. evtest shows proper scroll events,
Firefox works fine, and libinput test-gui reports proper scrolling.