| 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 3e1c0d6d185be1910912571ce75a980cd0a8cde2..3d32a2321f0da200b46d834eb94bf1d34a591e5d 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
|
| @@ -252,7 +252,7 @@ void GestureInterpreterLibevdevCros::OnGestureMove(const Gesture* gesture,
|
| // TODO(spang): Use move->start_time, move->end_time
|
| Dispatch(make_scoped_ptr(new MouseEvent(ET_MOUSE_MOVED,
|
| cursor_->location(),
|
| - cursor_->location(),
|
| + cursor_->root_location(),
|
| modifiers_->GetModifierFlags(),
|
| /* changed_button_flags */ 0)));
|
| }
|
| @@ -272,6 +272,7 @@ void GestureInterpreterLibevdevCros::OnGestureScroll(
|
| // TODO(spang): Use scroll->start_time
|
| Dispatch(make_scoped_ptr(new ScrollEvent(ET_SCROLL,
|
| cursor_->location(),
|
| + cursor_->root_location(),
|
| StimeToTimedelta(gesture->end_time),
|
| modifiers_->GetModifierFlags(),
|
| scroll->dx,
|
| @@ -339,6 +340,7 @@ void GestureInterpreterLibevdevCros::OnGestureFling(const Gesture* gesture,
|
| // Fling is like 2-finger scrolling but with velocity instead of displacement.
|
| Dispatch(make_scoped_ptr(new ScrollEvent(type,
|
| cursor_->location(),
|
| + cursor_->root_location(),
|
| StimeToTimedelta(gesture->end_time),
|
| modifiers_->GetModifierFlags(),
|
| fling->vx,
|
| @@ -362,6 +364,7 @@ void GestureInterpreterLibevdevCros::OnGestureSwipe(const Gesture* gesture,
|
| // Swipe is 3-finger scrolling.
|
| Dispatch(make_scoped_ptr(new ScrollEvent(ET_SCROLL,
|
| cursor_->location(),
|
| + cursor_->root_location(),
|
| StimeToTimedelta(gesture->end_time),
|
| modifiers_->GetModifierFlags(),
|
| swipe->dx,
|
| @@ -384,6 +387,7 @@ void GestureInterpreterLibevdevCros::OnGestureSwipeLift(
|
|
|
| Dispatch(make_scoped_ptr(new ScrollEvent(ET_SCROLL_FLING_START,
|
| cursor_->location(),
|
| + cursor_->root_location(),
|
| StimeToTimedelta(gesture->end_time),
|
| modifiers_->GetModifierFlags(),
|
| /* x_offset */ 0,
|
| @@ -421,11 +425,12 @@ void GestureInterpreterLibevdevCros::Dispatch(scoped_ptr<Event> event) {
|
| void GestureInterpreterLibevdevCros::DispatchMouseButton(unsigned int modifier,
|
| bool down) {
|
| const gfx::PointF& loc = cursor_->location();
|
| + const gfx::PointF& root_loc = cursor_->root_location();
|
| int flag = modifiers_->GetEventFlagFromModifier(modifier);
|
| EventType type = (down ? ET_MOUSE_PRESSED : ET_MOUSE_RELEASED);
|
| modifiers_->UpdateModifier(modifier, down);
|
| Dispatch(make_scoped_ptr(new MouseEvent(
|
| - type, loc, loc, modifiers_->GetModifierFlags() | flag, flag)));
|
| + type, loc, root_loc, modifiers_->GetModifierFlags() | flag, flag)));
|
| }
|
|
|
| void GestureInterpreterLibevdevCros::DispatchChangedKeys(Evdev* evdev,
|
|
|