| Index: ui/events/devices/x11/device_data_manager_x11.cc
|
| diff --git a/ui/events/devices/x11/device_data_manager_x11.cc b/ui/events/devices/x11/device_data_manager_x11.cc
|
| index 9d83afe1e34c98dbdaa8e91337c4b4818b295d6e..672ab0f0fa90af4550a69b84bdd88a8b2402ec6a 100644
|
| --- a/ui/events/devices/x11/device_data_manager_x11.cc
|
| +++ b/ui/events/devices/x11/device_data_manager_x11.cc
|
| @@ -771,6 +771,16 @@ void DeviceDataManagerX11::UpdateScrollClassDevice(
|
| int deviceid) {
|
| DCHECK(deviceid >= 0 && deviceid < kMaxDeviceNum);
|
| ScrollInfo& info = scroll_data_[deviceid];
|
| +
|
| + bool legacy_scroll_available =
|
| + (scroll_class_info->flags & XIScrollFlagNoEmulation) == 0;
|
| + // If the device's highest resolution is lower than the resolution of xinput1
|
| + // then use xinput1's events instead (ie. don't configure smooth scrolling).
|
| + if (legacy_scroll_available &&
|
| + std::abs(scroll_class_info->increment) <= 1.0) {
|
| + return;
|
| + }
|
| +
|
| switch (scroll_class_info->scroll_type) {
|
| case XIScrollTypeVertical:
|
| info.vertical.number = scroll_class_info->number;
|
|
|