[gtk+] Make gtk_window_resize work again



commit 42ee21e34cca476849fbb3cc787255be232e96a0
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat May 11 19:44:57 2013 -0400

    Make gtk_window_resize work again
    
    This hunk of code was lost by accident in the previous commit.

 gtk/gtkwindow.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index e0d6503..710497f 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -7897,6 +7897,20 @@ gtk_window_compute_configure_request_size (GtkWindow   *window,
       gtk_window_get_remembered_size (window, width, height);
     }
 
+  /* Override any size with gtk_window_resize() values */
+  if (info)
+    {
+      if (info->resize_width > 0)
+       *width = info->resize_width;
+      if (info->resize_height > 0)
+       *height = info->resize_height;
+
+      if (info->resize_is_geometry)
+       geometry_size_to_pixels (geometry, flags,
+                                info->resize_width > 0 ? width : NULL,
+                                info->resize_height > 0 ? height : NULL);
+    }
+
   /* Don't ever request zero width or height, it's not supported by
      gdk. The size allocation code will round it to 1 anyway but if
      we do it then the value returned from this function will is


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]