diff options
author | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-23 20:27:13 +0000 |
---|---|---|
committer | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-23 20:27:13 +0000 |
commit | c8efaf16ee45ef10dd02930a67b634f385a6906d (patch) | |
tree | 1e9660a18b29d860b3db60a8903ff206f76e4fd8 /remoting/client | |
parent | 9ebd90ec35d22b79a37da1ee4cdb072d07f42839 (diff) | |
download | chromium_src-c8efaf16ee45ef10dd02930a67b634f385a6906d.zip chromium_src-c8efaf16ee45ef10dd02930a67b634f385a6906d.tar.gz chromium_src-c8efaf16ee45ef10dd02930a67b634f385a6906d.tar.bz2 |
Fixed emitted mouse buttons events to avoid switching back to absolute movements every time a button is pressed.
BUG=132613
R=garykac@chromium.org
Review URL: https://codereview.chromium.org/24138004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224778 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/client')
-rw-r--r-- | remoting/client/plugin/pepper_input_handler.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/remoting/client/plugin/pepper_input_handler.cc b/remoting/client/plugin/pepper_input_handler.cc index cc1bef7..a34db14 100644 --- a/remoting/client/plugin/pepper_input_handler.cc +++ b/remoting/client/plugin/pepper_input_handler.cc @@ -95,6 +95,14 @@ bool PepperInputHandler::HandleInputEvent(const pp::InputEvent& event) { mouse_event.set_button_down(is_down); mouse_event.set_x(pp_mouse_event.GetPosition().x()); mouse_event.set_y(pp_mouse_event.GetPosition().y()); + + // Add relative movement if the mouse is locked. + if (mouse_lock_state_ == MouseLockOn) { + pp::Point delta = pp_mouse_event.GetMovement(); + mouse_event.set_delta_x(delta.x()); + mouse_event.set_delta_y(delta.y()); + } + input_stub_->InjectMouseEvent(mouse_event); } return true; |