From d7751c849114f9c7d69b52e1455ae249d6e54809 Mon Sep 17 00:00:00 2001 From: "dcaiafa@chromium.org" Date: Tue, 31 Jan 2012 19:33:34 +0000 Subject: 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 --- remoting/client/plugin/pepper_input_handler.cc | 2 ++ 1 file changed, 2 insertions(+) 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; -- cgit v1.1