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..53d13c5872f99923d2f19f1477e019a0f6ef0e4f 100644 |
--- a/remoting/host/input_injector_linux.cc |
+++ b/remoting/host/input_injector_linux.cc |
@@ -299,7 +299,14 @@ void InputInjectorLinux::Core::InjectMouseEvent(const MouseEvent& event) { |
return; |
} |
- if (event.has_x() && event.has_y()) { |
+ if (event.has_delta_x() && event.has_delta_y()) { |
+ latest_mouse_position_ = SkIPoint::Make(-1, -1); |
+ VLOG(3) << "Moving mouse by " << event.delta_x() << "," << event.delta_y(); |
+ XTestFakeRelativeMotionEvent(display_, DefaultScreen(display_), |
+ event.delta_x(), event.delta_y(), |
+ CurrentTime); |
Wez
2013/09/05 20:24:45
nit: Filter out 0x0 movement?
alexeypa (please no reviews)
2013/09/06 20:00:17
Done.
|
+ |
+ } 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. |