diff options
-rw-r--r-- | webkit/glue/plugins/webplugin_delegate_impl_gtk.cc | 4 | ||||
-rw-r--r-- | webkit/glue/plugins/webplugin_delegate_impl_win.cc | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc index 71df073..18b1504 100644 --- a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc +++ b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc @@ -487,12 +487,10 @@ void WebPluginDelegateImpl::WindowlessSetWindow() { void WebPluginDelegateImpl::SetFocus(bool focused) { DCHECK(instance()->windowless()); - if (!focused) - return; NPEvent np_event = {0}; XFocusChangeEvent &event = np_event.xfocus; - event.type = FocusIn; + event.type = focused ? FocusIn : FocusOut; event.display = GDK_DISPLAY(); // Same values as Firefox. .serial and .window stay 0. event.mode = -1; diff --git a/webkit/glue/plugins/webplugin_delegate_impl_win.cc b/webkit/glue/plugins/webplugin_delegate_impl_win.cc index 87bb088..09184ab 100644 --- a/webkit/glue/plugins/webplugin_delegate_impl_win.cc +++ b/webkit/glue/plugins/webplugin_delegate_impl_win.cc @@ -1050,11 +1050,9 @@ void WebPluginDelegateImpl::WindowlessSetWindow() { void WebPluginDelegateImpl::SetFocus(bool focused) { DCHECK(instance()->windowless()); - if (!focused) - return; NPEvent focus_event; - focus_event.event = WM_SETFOCUS; + focus_event.event = focused ? WM_SETFOCUS : WM_KILLFOCUS; focus_event.wParam = 0; focus_event.lParam = 0; |