diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-18 16:30:02 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-18 16:30:02 +0000 |
commit | 89d7ac15b518146cc57a7cc8df6b73bcf36a1c19 (patch) | |
tree | 57019e23f64655aa631449176fda9ce6398fbd7d /chrome/browser | |
parent | cceef99cfabebbafb13371fc6a47dd1c875fc8b1 (diff) | |
download | chromium_src-89d7ac15b518146cc57a7cc8df6b73bcf36a1c19.zip chromium_src-89d7ac15b518146cc57a7cc8df6b73bcf36a1c19.tar.gz chromium_src-89d7ac15b518146cc57a7cc8df6b73bcf36a1c19.tar.bz2 |
Linux: make RWHV::Focus() set native focus (in addition to webkit focus).
Review URL: http://codereview.chromium.org/113528
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16283 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/renderer_host/render_widget_host_view_gtk.cc | 13 |
1 files changed, 9 insertions, 4 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 ee2f7b9..c11d3af 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc +++ b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc @@ -234,16 +234,21 @@ void RenderWidgetHostViewGtk::MovePluginWindows( } void RenderWidgetHostViewGtk::Focus() { - host_->Focus(); + gtk_widget_grab_focus(view_.get()); } void RenderWidgetHostViewGtk::Blur() { - host_->Blur(); + // TODO(estade): We should be clearing native focus as well, but I know of no + // way to do that without focusing another widget. + // TODO(estade): it doesn't seem like the CanBlur() check should be necessary + // since we are only called in response to a ViewHost blur message, but this + // check is made on Windows so I've added it here as well. + if (host_->CanBlur()) + host_->Blur(); } bool RenderWidgetHostViewGtk::HasFocus() { - NOTIMPLEMENTED(); - return false; + return gtk_widget_is_focus(view_.get()); } void RenderWidgetHostViewGtk::Show() { |