diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-30 20:22:20 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-30 20:22:20 +0000 |
commit | 035287d8c3d2da31f7a6b64b4640768a4f6522cc (patch) | |
tree | 7ff796d75e7a2eb29ec6898751a5f2f95df49d71 /chrome/browser/renderer_host/render_widget_host_view_gtk.cc | |
parent | 74a35afe4cbcefce173fcd6bc6ad51753acf4b97 (diff) | |
download | chromium_src-035287d8c3d2da31f7a6b64b4640768a4f6522cc.zip chromium_src-035287d8c3d2da31f7a6b64b4640768a4f6522cc.tar.gz chromium_src-035287d8c3d2da31f7a6b64b4640768a4f6522cc.tar.bz2 |
GTK: render view: grab focus *before* forwarding mouse event to renderer.
BUG=18047
TEST=see bug
Review URL: http://codereview.chromium.org/159654
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22090 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/render_widget_host_view_gtk.cc')
-rw-r--r-- | chrome/browser/renderer_host/render_widget_host_view_gtk.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc index 98ed533..eddcf59 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc +++ b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc @@ -779,15 +779,16 @@ class RenderWidgetHostViewGtkWidget { event->x = x; event->y = y; } - host_view->is_popup_first_mouse_release_ = false; - host_view->GetRenderWidgetHost()->ForwardMouseEvent( - WebInputEventFactory::mouseEvent(event)); // TODO(evanm): why is this necessary here but not in test shell? // This logic is the same as GtkButton. if (event->type == GDK_BUTTON_PRESS && !GTK_WIDGET_HAS_FOCUS(widget)) gtk_widget_grab_focus(widget); + host_view->is_popup_first_mouse_release_ = false; + host_view->GetRenderWidgetHost()->ForwardMouseEvent( + WebInputEventFactory::mouseEvent(event)); + // Although we did handle the mouse event, we need to let other handlers // run (in particular the one installed by TabContentsViewGtk). return FALSE; |