diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-28 20:23:48 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-28 20:23:48 +0000 |
commit | b5a58cba835df1fecff5383d3a81093e8bfa2573 (patch) | |
tree | 5ec8b982ba1aaa4184943ea16e8d533bb24d9a86 | |
parent | ef85d47f1a76de6a2832607b7d80c45b5c662e65 (diff) | |
download | chromium_src-b5a58cba835df1fecff5383d3a81093e8bfa2573.zip chromium_src-b5a58cba835df1fecff5383d3a81093e8bfa2573.tar.gz chromium_src-b5a58cba835df1fecff5383d3a81093e8bfa2573.tar.bz2 |
Ensure that windowed plugins get keyboard focus in WM_MOUSEACTIVATe. This regressed with the introduction
of the Plugin wrapper window which parents the actual plugin window in the plugin process. We need to set focus to the actual plugin window when we receive a WM_MOUSEACTIVATE in the browser caused by a click on the plugin window.
This fixes http://code.google.com/p/chromium/issues/detail?id=7143
Bug=7143
Review URL: http://codereview.chromium.org/19626
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8820 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/renderer_host/render_widget_host_view_win.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host_view_win.cc b/chrome/browser/renderer_host/render_widget_host_view_win.cc index 4db44b6..84962fe 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_win.cc +++ b/chrome/browser/renderer_host/render_widget_host_view_win.cc @@ -815,6 +815,9 @@ LRESULT RenderWidgetHostViewWin::OnMouseActivate(UINT, WPARAM, LPARAM, ::ScreenToClient(m_hWnd, &cursor_pos); HWND child_window = ::RealChildWindowFromPoint(m_hWnd, cursor_pos); if (::IsWindow(child_window)) { + if (win_util::GetClassName(child_window) == kWrapperNativeWindowClassName) + child_window = ::GetWindow(child_window, GW_CHILD); + ::SetFocus(child_window); return MA_NOACTIVATE; } |