diff options
author | dcaiafa@chromium.org <dcaiafa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-31 19:33:34 +0000 |
---|---|---|
committer | dcaiafa@chromium.org <dcaiafa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-31 19:33:34 +0000 |
commit | d7751c849114f9c7d69b52e1455ae249d6e54809 (patch) | |
tree | 0aa2c365a06ffc69a2d08c892d2cdae3a91ae872 | |
parent | cfff11197040dbbaf1e21ef6bfb6b03f86b79ebe (diff) | |
download | chromium_src-d7751c849114f9c7d69b52e1455ae249d6e54809.zip chromium_src-d7751c849114f9c7d69b52e1455ae249d6e54809.tar.gz chromium_src-d7751c849114f9c7d69b52e1455ae249d6e54809.tar.bz2 |
Send position with mouse up/down events.
This change ensures that client & host agree on the position of mouse button events. This is especially relevant in the case where the client's plugin is not receiving mouse move events because it doesn't have focus, and the user clicks on the plugin. Without positional information, the host will process the button event at the host's initial mouse position, very likely not at the position intended by the user.
BUG=110688
TEST=manual
Review URL: http://codereview.chromium.org/9264060
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119934 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | remoting/client/plugin/pepper_input_handler.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/remoting/client/plugin/pepper_input_handler.cc b/remoting/client/plugin/pepper_input_handler.cc index 763796e..3bf006c 100644 --- a/remoting/client/plugin/pepper_input_handler.cc +++ b/remoting/client/plugin/pepper_input_handler.cc @@ -70,6 +70,8 @@ bool PepperInputHandler::HandleInputEvent(const pp::InputEvent& event) { if (mouse_event.has_button()) { bool is_down = (event.GetType() == PP_INPUTEVENT_TYPE_MOUSEDOWN); 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()); input_stub_->InjectMouseEvent(mouse_event); } return true; |