diff --git a/ChangeLog b/ChangeLog index 577c1cbb22..eda161da72 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Fri Sep 10 15:22:50 1999 Owen Taylor + + * gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo + where comparison was being done against an uninitialized + value causing intermittant results depending on + compiler flags. Also make it clearer that we aren't + ever initializing the child as 0x0 (though this will + be caught in gtk_widget_size_allocate()) + Fri Sep 10 10:06:56 1999 Owen Taylor * gtk/gtkwindow.c (gtk_window_set_transient_for): Move diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 577c1cbb22..eda161da72 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,12 @@ +Fri Sep 10 15:22:50 1999 Owen Taylor + + * gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo + where comparison was being done against an uninitialized + value causing intermittant results depending on + compiler flags. Also make it clearer that we aren't + ever initializing the child as 0x0 (though this will + be caught in gtk_widget_size_allocate()) + Fri Sep 10 10:06:56 1999 Owen Taylor * gtk/gtkwindow.c (gtk_window_set_transient_for): Move diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 577c1cbb22..eda161da72 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,12 @@ +Fri Sep 10 15:22:50 1999 Owen Taylor + + * gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo + where comparison was being done against an uninitialized + value causing intermittant results depending on + compiler flags. Also make it clearer that we aren't + ever initializing the child as 0x0 (though this will + be caught in gtk_widget_size_allocate()) + Fri Sep 10 10:06:56 1999 Owen Taylor * gtk/gtkwindow.c (gtk_window_set_transient_for): Move diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 577c1cbb22..eda161da72 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,12 @@ +Fri Sep 10 15:22:50 1999 Owen Taylor + + * gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo + where comparison was being done against an uninitialized + value causing intermittant results depending on + compiler flags. Also make it clearer that we aren't + ever initializing the child as 0x0 (though this will + be caught in gtk_widget_size_allocate()) + Fri Sep 10 10:06:56 1999 Owen Taylor * gtk/gtkwindow.c (gtk_window_set_transient_for): Move diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 577c1cbb22..eda161da72 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,12 @@ +Fri Sep 10 15:22:50 1999 Owen Taylor + + * gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo + where comparison was being done against an uninitialized + value causing intermittant results depending on + compiler flags. Also make it clearer that we aren't + ever initializing the child as 0x0 (though this will + be caught in gtk_widget_size_allocate()) + Fri Sep 10 10:06:56 1999 Owen Taylor * gtk/gtkwindow.c (gtk_window_set_transient_for): Move diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 577c1cbb22..eda161da72 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,12 @@ +Fri Sep 10 15:22:50 1999 Owen Taylor + + * gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo + where comparison was being done against an uninitialized + value causing intermittant results depending on + compiler flags. Also make it clearer that we aren't + ever initializing the child as 0x0 (though this will + be caught in gtk_widget_size_allocate()) + Fri Sep 10 10:06:56 1999 Owen Taylor * gtk/gtkwindow.c (gtk_window_set_transient_for): Move diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 577c1cbb22..eda161da72 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,12 @@ +Fri Sep 10 15:22:50 1999 Owen Taylor + + * gtk/gtkwindow.c (gtk_window_size_allocate): Fix typo + where comparison was being done against an uninitialized + value causing intermittant results depending on + compiler flags. Also make it clearer that we aren't + ever initializing the child as 0x0 (though this will + be caught in gtk_widget_size_allocate()) + Fri Sep 10 10:06:56 1999 Owen Taylor * gtk/gtkwindow.c (gtk_window_set_transient_for): Move diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 621f7e7130..05adee189e 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -1086,14 +1086,10 @@ gtk_window_size_allocate (GtkWidget *widget, { child_allocation.x = GTK_CONTAINER (window)->border_width; child_allocation.y = GTK_CONTAINER (window)->border_width; - if (allocation->width > child_allocation.x * 2) - child_allocation.width = allocation->width - child_allocation.x * 2; - else - child_allocation.width = 1; - if (child_allocation.height > child_allocation.y * 2) - child_allocation.height = allocation->height - child_allocation.y * 2; - else - child_allocation.height = 1; + child_allocation.width = + MAX (1, (gint)allocation->width - child_allocation.x * 2); + child_allocation.height = + MAX (1, (gint)allocation->height - child_allocation.y * 2); gtk_widget_size_allocate (window->bin.child, &child_allocation); }