| Index: remoting/host/input_injector_linux.cc
|
| diff --git a/remoting/host/input_injector_linux.cc b/remoting/host/input_injector_linux.cc
|
| index 94dcbd321e36d0518d8e31712eed5c3ecf1afffd..f6f80a27d94539f90a8be57f932ceb382033d84c 100644
|
| --- a/remoting/host/input_injector_linux.cc
|
| +++ b/remoting/host/input_injector_linux.cc
|
| @@ -18,7 +18,7 @@
|
| #include "remoting/base/logging.h"
|
| #include "remoting/host/clipboard.h"
|
| #include "remoting/proto/internal.pb.h"
|
| -#include "third_party/skia/include/core/SkPoint.h"
|
| +#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
|
| #include "ui/events/keycodes/dom4/keycode_converter.h"
|
|
|
| namespace remoting {
|
| @@ -99,7 +99,7 @@ class InputInjectorLinux : public InputInjector {
|
| scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
|
|
|
| std::set<int> pressed_keys_;
|
| - SkIPoint latest_mouse_position_;
|
| + webrtc::DesktopVector latest_mouse_position_;
|
| float wheel_ticks_x_;
|
| float wheel_ticks_y_;
|
|
|
| @@ -160,7 +160,7 @@ void InputInjectorLinux::Start(
|
| InputInjectorLinux::Core::Core(
|
| scoped_refptr<base::SingleThreadTaskRunner> task_runner)
|
| : task_runner_(task_runner),
|
| - latest_mouse_position_(SkIPoint::Make(-1, -1)),
|
| + latest_mouse_position_(-1, -1),
|
| wheel_ticks_x_(0.0f),
|
| wheel_ticks_y_(0.0f),
|
| display_(XOpenDisplay(NULL)),
|
| @@ -299,7 +299,7 @@ void InputInjectorLinux::Core::InjectMouseEvent(const MouseEvent& event) {
|
| if (event.has_delta_x() &&
|
| event.has_delta_y() &&
|
| (event.delta_x() != 0 || event.delta_y() != 0)) {
|
| - latest_mouse_position_ = SkIPoint::Make(-1, -1);
|
| + latest_mouse_position_.set(-1, -1);
|
| VLOG(3) << "Moving mouse by " << event.delta_x() << "," << event.delta_y();
|
| XTestFakeRelativeMotionEvent(display_,
|
| event.delta_x(), event.delta_y(),
|
| @@ -310,16 +310,16 @@ void InputInjectorLinux::Core::InjectMouseEvent(const MouseEvent& event) {
|
| // a MotionNotify even if the mouse position hasn't changed, which confuses
|
| // apps which assume MotionNotify implies movement. See crbug.com/138075.
|
| bool inject_motion = true;
|
| - SkIPoint new_mouse_position(SkIPoint::Make(event.x(), event.y()));
|
| + webrtc::DesktopVector new_mouse_position(
|
| + webrtc::DesktopVector(event.x(), event.y()));
|
| if (event.has_button() && event.has_button_down() && !event.button_down()) {
|
| - if (new_mouse_position == latest_mouse_position_)
|
| + if (new_mouse_position.equals(latest_mouse_position_))
|
| inject_motion = false;
|
| }
|
|
|
| if (inject_motion) {
|
| - latest_mouse_position_ =
|
| - SkIPoint::Make(std::max(0, new_mouse_position.x()),
|
| - std::max(0, new_mouse_position.y()));
|
| + latest_mouse_position_.set(std::max(0, new_mouse_position.x()),
|
| + std::max(0, new_mouse_position.y()));
|
|
|
| VLOG(3) << "Moving mouse to " << latest_mouse_position_.x()
|
| << "," << latest_mouse_position_.y();
|
|
|