diff options
Diffstat (limited to 'views/widget/widget_gtk.cc')
-rw-r--r-- | views/widget/widget_gtk.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/views/widget/widget_gtk.cc b/views/widget/widget_gtk.cc index 7d63a453..8762e14 100644 --- a/views/widget/widget_gtk.cc +++ b/views/widget/widget_gtk.cc @@ -403,7 +403,9 @@ void WidgetGtk::SetBounds(const gfx::Rect& bounds) { GtkWindow* gtk_window = GTK_WINDOW(widget_); // TODO: this may need to set an initial size if not showing. // TODO: need to constrain based on screen size. - gtk_window_resize(gtk_window, bounds.width(), bounds.height()); + if (!bounds.IsEmpty()) { + gtk_window_resize(gtk_window, bounds.width(), bounds.height()); + } gtk_window_move(gtk_window, bounds.x(), bounds.y()); } } @@ -1294,4 +1296,3 @@ Widget* Widget::GetWidgetFromNativeWindow(gfx::NativeWindow native_window) { } } // namespace views - |