Support HiresScroll gesture remapping
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.
This commit is contained in:
@@ -25,9 +25,9 @@ IntervalGesture::IntervalGesture(Device *device, libconfig::Setting &root) :
|
||||
{
|
||||
}
|
||||
|
||||
void IntervalGesture::press()
|
||||
void IntervalGesture::press(bool init_threshold)
|
||||
{
|
||||
_axis = 0;
|
||||
_axis = init_threshold ? _config.threshold() : 0;
|
||||
_interval_pass_count = 0;
|
||||
}
|
||||
|
||||
@@ -52,6 +52,11 @@ void IntervalGesture::move(int16_t axis)
|
||||
_interval_pass_count = new_interval_count;
|
||||
}
|
||||
|
||||
bool IntervalGesture::wheelCompatibility() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool IntervalGesture::metThreshold() const
|
||||
{
|
||||
return _axis >= _config.threshold();
|
||||
|
||||
Reference in New Issue
Block a user