]> Pileus Git - ~andy/gtk/commitdiff
Correctly handle min size. (#320465, Philipp Langdale)
authorMatthias Clasen <mclasen@redhat.com>
Sun, 31 Dec 2006 00:57:27 +0000 (00:57 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sun, 31 Dec 2006 00:57:27 +0000 (00:57 +0000)
2006-12-30  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkwindow.c (gtk_window_compute_configure_request_size):
        Correctly handle min size. (#320465, Philipp Langdale)

svn path=/trunk/; revision=16986

ChangeLog
gtk/gtkwindow.c

index 88fff3e12d2624dde89ba447c2dbe629449eac9b..df44c5fc2b59539ee41149b8611df1985f2037d6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-12-30  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkwindow.c (gtk_window_compute_configure_request_size):
+       Correctly handle min size. (#320465, Philipp Langdale)
+
 2006-12-30  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/prop-editor.c: Implement editing of flags.
index c12dc6a1519c8c418275743f6d67a7530cf5cbe6..b8569b5dccda86c59752bff31e533d9475d4a290 100644 (file)
@@ -5120,6 +5120,8 @@ gtk_window_compute_configure_request_size (GtkWindow *window,
          {
           gint base_width = 0;
           gint base_height = 0;
+          gint min_width = 0;
+          gint min_height = 0;
           gint width_inc = 1;
           gint height_inc = 1;
           
@@ -5136,10 +5138,10 @@ gtk_window_compute_configure_request_size (GtkWindow *window,
                   base_width = geometry.base_width;
                   base_height = geometry.base_height;
                 }
-              else if (flags & GDK_HINT_MIN_SIZE)
+              if (flags & GDK_HINT_MIN_SIZE)
                 {
-                  base_width = geometry.min_width;
-                  base_height = geometry.min_height;
+                  min_width = geometry.min_width;
+                  min_height = geometry.min_height;
                 }
               if (flags & GDK_HINT_RESIZE_INC)
                 {
@@ -5149,10 +5151,10 @@ gtk_window_compute_configure_request_size (GtkWindow *window,
             }
             
           if (info->default_width > 0)
-            *width = info->default_width * width_inc + base_width;
+            *width = MAX (info->default_width * width_inc + base_width, min_width);
           
           if (info->default_height > 0)
-            *height = info->default_height * height_inc + base_height;
+            *height = MAX (info->default_height * height_inc + base_height, min_height);
          }
     }
   else