Chromium Code Reviews| Index: remoting/client/plugin/pepper_input_handler.cc |
| diff --git a/remoting/client/plugin/pepper_input_handler.cc b/remoting/client/plugin/pepper_input_handler.cc |
| index 9069f1a1f0b3703c2db1678ec8640d0f28c7b444..60a2746b8cd0fd2d1db7bb4b2d8623eba1e88f41 100644 |
| --- a/remoting/client/plugin/pepper_input_handler.cc |
| +++ b/remoting/client/plugin/pepper_input_handler.cc |
| @@ -75,6 +75,9 @@ bool PepperInputHandler::HandleInputEvent(const pp::InputEvent& event) { |
| case PP_INPUTEVENT_TYPE_MOUSEDOWN: |
| case PP_INPUTEVENT_TYPE_MOUSEUP: { |
| + if (!has_focus_) |
| + return false; |
|
Jamie
2014/02/07 22:34:39
I'm in two minds about this one. Some platforms (s
weitao
2014/02/07 23:54:23
I agree the first behavior is better.
On 2014/02/
|
| + |
| pp::MouseInputEvent pp_mouse_event(event); |
| protocol::MouseEvent mouse_event; |
| switch (pp_mouse_event.GetButton()) { |
| @@ -111,6 +114,9 @@ bool PepperInputHandler::HandleInputEvent(const pp::InputEvent& event) { |
| case PP_INPUTEVENT_TYPE_MOUSEMOVE: |
| case PP_INPUTEVENT_TYPE_MOUSEENTER: |
| case PP_INPUTEVENT_TYPE_MOUSELEAVE: { |
| + if (!has_focus_) |
| + return false; |
| + |
| pp::MouseInputEvent pp_mouse_event(event); |
| protocol::MouseEvent mouse_event; |
| mouse_event.set_x(pp_mouse_event.GetPosition().x()); |
| @@ -128,6 +134,9 @@ bool PepperInputHandler::HandleInputEvent(const pp::InputEvent& event) { |
| } |
| case PP_INPUTEVENT_TYPE_WHEEL: { |
| + if (!has_focus_) |
| + return false; |
| + |
| pp::WheelInputEvent pp_wheel_event(event); |
| // Don't handle scroll-by-page events, for now. |