[gtk+] window: last size is more important than default size
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] window: last size is more important than default size
- Date: Wed, 1 May 2013 15:47:34 +0000 (UTC)
commit 2d29c4a43fbdab4d9fcae2589cf729b2dd1c3783
Author: Benjamin Otte <otte redhat com>
Date: Wed May 1 16:40:13 2013 +0200
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
gtk/gtkwindow.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index d509920..16942b8 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -7838,9 +7838,6 @@ gtk_window_compute_configure_request_size (GtkWindow *window,
info = gtk_window_get_geometry_info (window, FALSE);
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 (*width == 0 && *height == 0)
@@ -7850,7 +7847,6 @@ gtk_window_compute_configure_request_size (GtkWindow *window,
}
/* Override with default size */
-
if (info)
{
if (info->default_width > 0)
@@ -7864,6 +7860,11 @@ gtk_window_compute_configure_request_size (GtkWindow *window,
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 */
if (info)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]