summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>1999-09-10 19:19:00 +0000
committerOwen Taylor <otaylor@src.gnome.org>1999-09-10 19:19:00 +0000
commit6362c20b8b3fa137fa0fd2f306345f520855d0f7 (patch)
treeb79e2d73b1374a48b9a6b4de034fe7297c0e4f9f
parenta88d8fff6d11ab46c213fc040acc5011e4bb7809 (diff)
downloadgdk-pixbuf-6362c20b8b3fa137fa0fd2f306345f520855d0f7.tar.gz
Fix typo where comparison was being done against an uninitialized value
Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com> * 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())
-rw-r--r--ChangeLog9
-rw-r--r--ChangeLog.pre-2-09
-rw-r--r--ChangeLog.pre-2-109
-rw-r--r--ChangeLog.pre-2-29
-rw-r--r--ChangeLog.pre-2-49
-rw-r--r--ChangeLog.pre-2-69
-rw-r--r--ChangeLog.pre-2-89
-rw-r--r--gtk/gtkwindow.c12
8 files changed, 67 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 577c1cbb2..eda161da7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
+
+ * 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 <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index 577c1cbb2..eda161da7 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,12 @@
+Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
+
+ * 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 <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 577c1cbb2..eda161da7 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,12 @@
+Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
+
+ * 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 <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 577c1cbb2..eda161da7 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,12 @@
+Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
+
+ * 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 <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 577c1cbb2..eda161da7 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,12 @@
+Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
+
+ * 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 <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 577c1cbb2..eda161da7 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,12 @@
+Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
+
+ * 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 <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 577c1cbb2..eda161da7 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,12 @@
+Fri Sep 10 15:22:50 1999 Owen Taylor <otaylor@redhat.com>
+
+ * 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 <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_transient_for): Move
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 621f7e713..05adee189 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);
}