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

Unified Diff: views/widget/native_widget_gtk.cc

Issue 8202026: views: Some more layer change, and add/update some tests for layers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 2 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
Index: views/widget/native_widget_gtk.cc
diff --git a/views/widget/native_widget_gtk.cc b/views/widget/native_widget_gtk.cc
index a16034255e7d16cda9166d64fec3e812d1f0cadd..8f9b735945445987f0e550fa9a7c49a1916218f5 100644
--- a/views/widget/native_widget_gtk.cc
+++ b/views/widget/native_widget_gtk.cc
@@ -1196,8 +1196,6 @@ void NativeWidgetGtk::Show() {
gtk_widget_show(widget_);
if (widget_->window)
gdk_window_raise(widget_->window);
- // See Hide() for the reason why we're not calling
- // OnNativeWidgetVisibilityChange.
}
}
@@ -1206,15 +1204,6 @@ void NativeWidgetGtk::Hide() {
gtk_widget_hide(widget_);
if (widget_->window)
gdk_window_lower(widget_->window);
- // 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.
}
}
@@ -1825,6 +1814,7 @@ void NativeWidgetGtk::OnDestroyed(GObject *where_the_object_was) {
}
void NativeWidgetGtk::OnShow(GtkWidget* widget) {
+ delegate_->OnNativeWidgetVisibilityChanged(true);
}
void NativeWidgetGtk::OnMap(GtkWidget* widget) {
@@ -1841,6 +1831,7 @@ void NativeWidgetGtk::OnMap(GtkWidget* widget) {
}
void NativeWidgetGtk::OnHide(GtkWidget* widget) {
+ delegate_->OnNativeWidgetVisibilityChanged(false);
}
gboolean NativeWidgetGtk::OnWindowStateEvent(GtkWidget* widget,

Powered by Google App Engine
This is Rietveld 408576698