Commit 2d29c4a4 authored by Benjamin Otte's avatar Benjamin Otte

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
parent 01f7ed1d
...@@ -7838,9 +7838,6 @@ gtk_window_compute_configure_request_size (GtkWindow *window, ...@@ -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, ...@@ -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, ...@@ -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)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment