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

Unified Diff: views/widget/native_widget_gtk.cc

Issue 8527008: Makes NativeWidgetGtk create TYPE_CONTROL widgets initially (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | « no previous file | 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 face60c6710dad0a4b85e10a14af07c60c588313..88a2f6e83d136beb781dffeab8d1be18e9cc1c1b 100644
--- a/views/widget/native_widget_gtk.cc
+++ b/views/widget/native_widget_gtk.cc
@@ -1972,7 +1972,7 @@ void NativeWidgetGtk::CreateGtkWidget(const Widget::InitParams& params) {
if (!params.parent && !null_parent_) {
GtkWidget* popup = gtk_window_new(GTK_WINDOW_POPUP);
null_parent_ = gtk_fixed_new();
- gtk_widget_set_name(widget_, "views-gtkwidget-null-parent");
+ gtk_widget_set_name(null_parent_, "views-gtkwidget-null-parent");
gtk_container_add(GTK_CONTAINER(popup), null_parent_);
gtk_widget_realize(null_parent_);
}
@@ -2006,6 +2006,10 @@ void NativeWidgetGtk::CreateGtkWidget(const Widget::InitParams& params) {
{ 0, 0, params.bounds.width(), params.bounds.height() };
gtk_widget_size_allocate(widget_, &alloc);
}
+ if (params.type == Widget::InitParams::TYPE_CONTROL) {
+ // Controls are initially visible.
+ gtk_widget_show(widget_);
+ }
} else {
Widget::InitParams::Type type = params.type;
if (type == Widget::InitParams::TYPE_BUBBLE &&
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698