From: Rui Matos Date: Thu, 31 Mar 2016 18:56:01 +0000 (+0200) Subject: gtkwindow: Don't allow unresizable windows to be smaller than required X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~24^2~5036 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4bfa6c30bf6fdebad0c67feed2097aa327e6aa3e;p=gtk4.git gtkwindow: Don't allow unresizable windows to be smaller than required Commit cdc580463e409a9b7e5f1480afa68d875ff3ff65 made it so that unresizable windows can't be smaller than a set default size but it lost the logic to ensure these windows remain at least big enough to comply with their requisition. https://bugzilla.gnome.org/show_bug.cgi?id=764174 --- diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 31086eddf5..f1d736c885 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -9983,14 +9983,16 @@ gtk_window_update_fixed_size (GtkWindow *window, if (info->default_width > -1) { - new_geometry->min_width = MAX (default_width_csd, new_width); - new_geometry->max_width = new_geometry->min_width; + gint w = MAX (MAX (default_width_csd, new_width), new_geometry->min_width); + new_geometry->min_width = w; + new_geometry->max_width = w; } if (info->default_height > -1) { - new_geometry->min_height = MAX (default_height_csd, new_height); - new_geometry->max_height = new_geometry->min_height; + gint h = MAX (MAX (default_height_csd, new_height), new_geometry->min_height); + new_geometry->min_height = h; + new_geometry->max_height = h; } } }