[gtk+] gtkwindow: Fix regression with fixed size windows



commit 4a729dc233cad771d577470c5130f46e44d97aa6
Author: Olivier Fourdan <ofourdan redhat com>
Date:   Thu Mar 3 17:47:35 2016 +0100

    gtkwindow: Fix regression with fixed size windows
    
    Previous commit to address the default size introduced a regression
    with fixed size windows if no default size was given, the resulting
    window would end up much smaller than its actual content.

 gtk/gtkwindow.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 008f630..8a3d749 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -9138,8 +9138,10 @@ gtk_window_compute_configure_request (GtkWindow    *window,
     {
       new_flags |= GDK_HINT_MAX_SIZE;
 
-      new_geometry.max_width = new_geometry.min_width = w;
-      new_geometry.max_height = new_geometry.min_height = h;
+      new_geometry.min_width = MAX (w, new_geometry.min_width);
+      new_geometry.max_width = new_geometry.min_width;
+      new_geometry.min_height = MAX (h, new_geometry.min_height);
+      new_geometry.max_height = new_geometry.min_height;
     }
 
   gtk_window_constrain_size (window,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]