mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-18 17:30:10 +00:00
window: last size is more important than default size
reorder size computation code to reflect that. https://bugzilla.gnome.org/show_bug.cgi?id=696882
This commit is contained in:
parent
01f7ed1d07
commit
2d29c4a43f
@ -7838,9 +7838,6 @@ gtk_window_compute_configure_request_size (GtkWindow *window,
|
|||||||
info = gtk_window_get_geometry_info (window, FALSE);
|
info = gtk_window_get_geometry_info (window, FALSE);
|
||||||
|
|
||||||
gtk_window_guess_default_size (window, width, height);
|
gtk_window_guess_default_size (window, width, height);
|
||||||
gtk_window_get_remembered_size (window, &w, &h);
|
|
||||||
*width = MAX (*width, w);
|
|
||||||
*height = MAX (*height, h);
|
|
||||||
|
|
||||||
/* If window is empty so requests 0, default to random nonzero size */
|
/* If window is empty so requests 0, default to random nonzero size */
|
||||||
if (*width == 0 && *height == 0)
|
if (*width == 0 && *height == 0)
|
||||||
@ -7850,7 +7847,6 @@ gtk_window_compute_configure_request_size (GtkWindow *window,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Override with default size */
|
/* Override with default size */
|
||||||
|
|
||||||
if (info)
|
if (info)
|
||||||
{
|
{
|
||||||
if (info->default_width > 0)
|
if (info->default_width > 0)
|
||||||
@ -7864,6 +7860,11 @@ gtk_window_compute_configure_request_size (GtkWindow *window,
|
|||||||
info->default_height > 0 ? height : NULL);
|
info->default_height > 0 ? height : NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Override with last size of this window */
|
||||||
|
gtk_window_get_remembered_size (window, &w, &h);
|
||||||
|
*width = MAX (*width, w);
|
||||||
|
*height = MAX (*height, h);
|
||||||
|
|
||||||
/* Override any size with gtk_window_resize() values */
|
/* Override any size with gtk_window_resize() values */
|
||||||
if (info)
|
if (info)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user