diff options
author | Matthias Clasen <mclasen@redhat.com> | 2013-05-11 19:44:57 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2013-05-11 19:44:57 -0400 |
commit | 42ee21e34cca476849fbb3cc787255be232e96a0 (patch) | |
tree | aaf904c08d38dbb9d8ee69942f20c47107367c52 | |
parent | fc10ee8d4a6694861d6be5dfd0f8f5e07a998ce0 (diff) | |
download | gtk+-42ee21e34cca476849fbb3cc787255be232e96a0.tar.gz |
Make gtk_window_resize work again
This hunk of code was lost by accident in the previous commit.
-rw-r--r-- | gtk/gtkwindow.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index e0d650365a..710497fd8a 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 |