]> khamidou — GitHub mirrors - electron.git/commitdiff
gtk: Fix setting unresizable window.
authorCheng Zhao <zcbenz@gmail.com>
Sun, 25 May 2014 03:44:25 +0000 (11:44 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Sun, 25 May 2014 03:44:25 +0000 (11:44 +0800)
atom/browser/native_window_gtk.cc

index d556276633ad62a3068012241d35127eff0f642f..ea78f5e23e9609b1acb6f1b31f63a160b9ff4242 100644 (file)
@@ -315,7 +315,7 @@ gfx::Size NativeWindowGtk::GetMaximumSize() {
 void NativeWindowGtk::SetResizable(bool resizable) {
   // Should request widget size after setting unresizable, otherwise the
   // window will shrink to a very small size.
-  if (!IsResizable()) {
+  if (!IsResizable() || !has_ever_been_shown_) {
     gint width, height;
     gtk_window_get_size(window_, &width, &height);
     gtk_widget_set_size_request(GTK_WIDGET(window_), width, height);