| Index: remoting/host/input_injector_linux.cc
|
| diff --git a/remoting/host/input_injector_linux.cc b/remoting/host/input_injector_linux.cc
|
| index cbb807bdc3a65aaed001f500244caaff0bc85517..d61d8f2072441dab7370ec31156969f659bd594a 100644
|
| --- a/remoting/host/input_injector_linux.cc
|
| +++ b/remoting/host/input_injector_linux.cc
|
| @@ -299,7 +299,16 @@ void InputInjectorLinux::Core::InjectMouseEvent(const MouseEvent& event) {
|
| return;
|
| }
|
|
|
| - if (event.has_x() && event.has_y()) {
|
| + if (event.has_delta_x() &&
|
| + event.has_delta_y() &&
|
| + (event.delta_x() != 0 || event.delta_y() != 0)) {
|
| + latest_mouse_position_ = SkIPoint::Make(-1, -1);
|
| + VLOG(3) << "Moving mouse by " << event.delta_x() << "," << event.delta_y();
|
| + XTestFakeRelativeMotionEvent(display_,
|
| + event.delta_x(), event.delta_y(),
|
| + CurrentTime);
|
| +
|
| + } else if (event.has_x() && event.has_y()) {
|
| // Injecting a motion event immediately before a button release results in
|
| // a MotionNotify even if the mouse position hasn't changed, which confuses
|
| // apps which assume MotionNotify implies movement. See crbug.com/138075.
|
|
|