Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1192)

Unified Diff: views/widget/native_widget_gtk.cc

Issue 7978015: Don't call OnNativeWidgetVisibilityChange in NativeWidgetGtk (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/find_bar/find_bar_host_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/native_widget_gtk.cc
diff --git a/views/widget/native_widget_gtk.cc b/views/widget/native_widget_gtk.cc
index 6a7973c0659cd5fc9c304e5966c09538e46eeeb8..28d9bbae8eeebd527cb38b105cab86b7731012c0 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.
}
}
« no previous file with comments | « chrome/browser/ui/find_bar/find_bar_host_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698