gtkwindow: Don't allow unresizable windows to be smaller than required

Commit cdc580463e 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
This commit is contained in:
Rui Matos 2016-03-31 20:56:01 +02:00
parent 84dfda1a2b
commit 4bfa6c30bf

View File

@ -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;
}
}
}