Index: chrome/browser/render_widget_host_view_win.cc |
=================================================================== |
--- chrome/browser/render_widget_host_view_win.cc (revision 7623) |
+++ chrome/browser/render_widget_host_view_win.cc (working copy) |
@@ -78,7 +78,7 @@ |
shutdown_factory_(this), |
parent_hwnd_(NULL), |
is_loading_(false), |
- focus_on_show_(true) { |
+ activatable_(true) { |
render_widget_host_->set_view(this); |
renderer_accessible_ = |
CommandLine().HasSwitch(switches::kEnableRendererAccessibility); |
@@ -166,7 +166,7 @@ |
render_widget_host_->ForwardMouseEvent(event); |
- if (event.type == WebInputEvent::MOUSE_DOWN) { |
+ if (activatable_ && event.type == WebInputEvent::MOUSE_DOWN) { |
// This is a temporary workaround for bug 765011 to get focus when the |
// mouse is clicked. This happens after the mouse down event is sent to |
// the renderer because normally Windows does a WM_SETFOCUS after |
@@ -780,6 +780,9 @@ |
LRESULT RenderWidgetHostViewWin::OnMouseActivate(UINT, WPARAM, LPARAM, |
BOOL& handled) { |
+ if (!activatable_) |
+ return MA_NOACTIVATE; |
+ |
HWND focus_window = GetFocus(); |
if (!::IsWindow(focus_window) || !IsChild(focus_window)) { |
// We handle WM_MOUSEACTIVATE to set focus to the underlying plugin |