| Index: ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc
|
| diff --git a/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc b/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc
|
| index 59d8735cc5371d693c5d7b16b3cec8e76eaa073f..cd6f128c4cda0c8d32e24435e500c077ea78bd1d 100644
|
| --- a/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc
|
| +++ b/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc
|
| @@ -36,18 +36,20 @@ GestureInterpreterDeviceClass GestureDeviceClass(Evdev* evdev) {
|
| }
|
|
|
| // Convert libevdev state to libgestures hardware properties.
|
| -HardwareProperties GestureHardwareProperties(Evdev* evdev) {
|
| +HardwareProperties GestureHardwareProperties(
|
| + Evdev* evdev,
|
| + const GesturePropertyProvider::DeviceProperty& props) {
|
| HardwareProperties hwprops;
|
| - hwprops.left = Event_Get_Left(evdev);
|
| - hwprops.top = Event_Get_Top(evdev);
|
| - hwprops.right = Event_Get_Right(evdev);
|
| - hwprops.bottom = Event_Get_Bottom(evdev);
|
| - hwprops.res_x = Event_Get_Res_X(evdev);
|
| - hwprops.res_y = Event_Get_Res_Y(evdev);
|
| + hwprops.left = props.area_left;
|
| + hwprops.top = props.area_top;
|
| + hwprops.right = props.area_right;
|
| + hwprops.bottom = props.area_bottom;
|
| + hwprops.res_x = props.res_x;
|
| + hwprops.res_y = props.res_y;
|
| hwprops.screen_x_dpi = 133;
|
| hwprops.screen_y_dpi = 133;
|
| - hwprops.orientation_minimum = Event_Get_Orientation_Minimum(evdev);
|
| - hwprops.orientation_maximum = Event_Get_Orientation_Maximum(evdev);
|
| + hwprops.orientation_minimum = props.orientation_minimum;
|
| + hwprops.orientation_maximum = props.orientation_maximum;
|
| hwprops.max_finger_cnt = Event_Get_Slot_Count(evdev);
|
| hwprops.max_touch_cnt = Event_Get_Touch_Count_Max(evdev);
|
| hwprops.supports_t5r2 = Event_Get_T5R2(evdev);
|
| @@ -100,12 +102,18 @@ void GestureInterpreterLibevdevCros::OnLibEvdevCrosOpen(
|
| DCHECK(evdev->info.is_monotonic) << "libevdev must use monotonic timestamps";
|
| VLOG(9) << "HACK DO NOT REMOVE OR LINK WILL FAIL" << (void*)gestures_log;
|
|
|
| - HardwareProperties hwprops = GestureHardwareProperties(evdev);
|
| + GesturesPropFunctionsWrapper::InitializeDeviceProperties(evdev,
|
| + &device_props_);
|
| + HardwareProperties hwprops = GestureHardwareProperties(evdev, device_props_);
|
| GestureInterpreterDeviceClass devclass = GestureDeviceClass(evdev);
|
|
|
| // Create & initialize GestureInterpreter.
|
| DCHECK(!interpreter_);
|
| interpreter_ = NewGestureInterpreter();
|
| + GestureInterpreterSetPropProvider(
|
| + interpreter_,
|
| + const_cast<GesturesPropProvider*>(&kGesturePropProvider),
|
| + evdev);
|
| GestureInterpreterInitialize(interpreter_, devclass);
|
| GestureInterpreterSetHardwareProperties(interpreter_, &hwprops);
|
| GestureInterpreterSetTimerProvider(
|
|
|