diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-02 15:17:16 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-02 15:17:16 +0000 |
commit | a7859412517983e37dee8fabf398ca27701c5ad0 (patch) | |
tree | 40dfc13819789b8daa3729219022e45babbab704 /views/widget/widget_gtk.cc | |
parent | f67131a62cfde0397fe4f442fdf7aa4925986c73 (diff) | |
download | chromium_src-a7859412517983e37dee8fabf398ca27701c5ad0.zip chromium_src-a7859412517983e37dee8fabf398ca27701c5ad0.tar.gz chromium_src-a7859412517983e37dee8fabf398ca27701c5ad0.tar.bz2 |
Fixes a couple of bugs encountered in getting info bubbles to work:
. Initial bounds of windows weren't being set.
. Widgets were created initially shown. This was bad for windows as
the window would end up showing prematurely.
. WindowGtk::window_state_ wasn't being initialized.
. And then actual InfoBubble stuff: properly init the bubble, show it
and position it on the monitor.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/118102
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17401 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget/widget_gtk.cc')
-rw-r--r-- | views/widget/widget_gtk.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/views/widget/widget_gtk.cc b/views/widget/widget_gtk.cc index 01b6b87..f79601e 100644 --- a/views/widget/widget_gtk.cc +++ b/views/widget/widget_gtk.cc @@ -163,6 +163,10 @@ void WidgetGtk::Init(GtkWidget* parent, parent_widget->AddChild(widget_); parent_widget->PositionChild(widget_, bounds.x(), bounds.y(), bounds.width(), bounds.height()); + } else { + if (bounds.width() > 0 && bounds.height() > 0) + gtk_window_resize(GTK_WINDOW(widget_), bounds.width(), bounds.height()); + gtk_window_move(GTK_WINDOW(widget_), bounds.x(), bounds.y()); } } @@ -364,7 +368,6 @@ void WidgetGtk::CreateGtkWidget() { SetViewForNative(child_widget_parent_, this); } - gtk_widget_show(widget_); } void WidgetGtk::OnSizeAllocate(GtkWidget* widget, GtkAllocation* allocation) { |