From b5a58cba835df1fecff5383d3a81093e8bfa2573 Mon Sep 17 00:00:00 2001 From: "ananta@chromium.org" Date: Wed, 28 Jan 2009 20:23:48 +0000 Subject: 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 --- chrome/browser/renderer_host/render_widget_host_view_win.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'chrome/browser/renderer_host') 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; } -- cgit v1.1