diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-22 03:19:52 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-22 03:19:52 +0000 |
commit | 88de6c013ddad04c6896f10714c787ce21cf858a (patch) | |
tree | 58afe864c5335bbf7ead61f8082fb70b5c9dbfe6 /views/widget | |
parent | 9f7e241b3649c863e353c724d1117b3f56e5f512 (diff) | |
download | chromium_src-88de6c013ddad04c6896f10714c787ce21cf858a.zip chromium_src-88de6c013ddad04c6896f10714c787ce21cf858a.tar.gz chromium_src-88de6c013ddad04c6896f10714c787ce21cf858a.tar.bz2 |
Don't call OnNativeWidgetVisibilityChange in NativeWidgetGtk
BUG=chromium-os:20545
TEST=added a test case in FindInPageControllerTest.AcceleratorRestoring. See bug for repro step.
Review URL: http://codereview.chromium.org/7978015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102233 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget')
-rw-r--r-- | views/widget/native_widget_gtk.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/views/widget/native_widget_gtk.cc b/views/widget/native_widget_gtk.cc index 6890c9c..b6a2280 100644 --- a/views/widget/native_widget_gtk.cc +++ b/views/widget/native_widget_gtk.cc @@ -1166,7 +1166,8 @@ void NativeWidgetGtk::Show() { gtk_widget_show(widget_); if (widget_->window) gdk_window_raise(widget_->window); - delegate_->OnNativeWidgetVisibilityChanged(true); + // See Hide() for the reason why we're not calling + // OnNativeWidgetVisibilityChange. } } @@ -1175,7 +1176,15 @@ void NativeWidgetGtk::Hide() { gtk_widget_hide(widget_); if (widget_->window) gdk_window_lower(widget_->window); - delegate_->OnNativeWidgetVisibilityChanged(false); + // We're not calling OnNativeWidgetVisibilityChanged because it + // breaks the ability to refocus to FindBar. NativeControlGtk + // detaches the underlying gtk widget for optimization purpose + // when it becomes invisible, which in turn breaks SetNativeFocus + // because there is no gtk attached to NativeControlGtk. I'm not + // fixing that part because + // a) This is views/gtk only issue, which will be gone soon. + // b) Alternative fix, which we can modify animator to show it + // immediately, won't be necessary for non gtk implementation. } } |