Chromium Code Reviews| 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 b0bd0e4b555b9be50f163fda8c074d0c8d342219..b28d459ca4032889bca5561699c735010a6d3108 100644 |
| --- a/ui/events/devices/x11/device_data_manager_x11.cc |
| +++ b/ui/events/devices/x11/device_data_manager_x11.cc |
| @@ -773,6 +773,14 @@ void DeviceDataManagerX11::UpdateScrollClassDevice( |
| int deviceid) { |
| DCHECK(deviceid >= 0 && deviceid < kMaxDeviceNum); |
| ScrollInfo& info = scroll_data_[deviceid]; |
| + |
| + if ((scroll_class_info->flags & XIScrollFlagNoEmulation) == 0 && |
| + (scroll_class_info->increment == 0.0 || |
| + scroll_class_info->increment == 1.0 || |
| + scroll_class_info->increment == -1.0)) { |
| + return; |
| + } |
|
sadrul
2016/04/19 14:40:50
Add a comment here. The code could be more readabl
|
| + |
| switch (scroll_class_info->scroll_type) { |
| case XIScrollTypeVertical: |
| info.vertical.number = scroll_class_info->number; |