From 11750394765a0ce2925bbf1dda3e11e7d80f4d14 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Mon, 24 Jan 2000 02:41:59 +0000 Subject: [PATCH] Don't realize the widget when it is size allocated! (old, old bug) Sun Jan 23 22:12:36 2000 Owen Taylor * gtk/gtkviewport.c (gtk_viewport_size_allocate): Don't realize the widget when it is size allocated! (old, old bug) * gtk/gtkviewport.c (gtk_viewport_adjustment_value_changed): Removed unused call to gdk_window_get_size() that showed up when the above was fixed. --- ChangeLog | 10 ++++++++++ ChangeLog.pre-2-0 | 10 ++++++++++ ChangeLog.pre-2-10 | 10 ++++++++++ ChangeLog.pre-2-2 | 10 ++++++++++ ChangeLog.pre-2-4 | 10 ++++++++++ ChangeLog.pre-2-6 | 10 ++++++++++ ChangeLog.pre-2-8 | 10 ++++++++++ gtk/gtkviewport.c | 13 ++++--------- 8 files changed, 74 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5326c88b75..8511284cab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Sun Jan 23 22:12:36 2000 Owen Taylor + + * gtk/gtkviewport.c (gtk_viewport_size_allocate): Don't + realize the widget when it is size allocated! + (old, old bug) + + * gtk/gtkviewport.c (gtk_viewport_adjustment_value_changed): + Removed unused call to gdk_window_get_size() that + showed up when the above was fixed. + Sun Jan 23 20:52:40 2000 Owen Taylor * INSTALL: Added short note about setting LDFLAGS diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 5326c88b75..8511284cab 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,13 @@ +Sun Jan 23 22:12:36 2000 Owen Taylor + + * gtk/gtkviewport.c (gtk_viewport_size_allocate): Don't + realize the widget when it is size allocated! + (old, old bug) + + * gtk/gtkviewport.c (gtk_viewport_adjustment_value_changed): + Removed unused call to gdk_window_get_size() that + showed up when the above was fixed. + Sun Jan 23 20:52:40 2000 Owen Taylor * INSTALL: Added short note about setting LDFLAGS diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 5326c88b75..8511284cab 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,13 @@ +Sun Jan 23 22:12:36 2000 Owen Taylor + + * gtk/gtkviewport.c (gtk_viewport_size_allocate): Don't + realize the widget when it is size allocated! + (old, old bug) + + * gtk/gtkviewport.c (gtk_viewport_adjustment_value_changed): + Removed unused call to gdk_window_get_size() that + showed up when the above was fixed. + Sun Jan 23 20:52:40 2000 Owen Taylor * INSTALL: Added short note about setting LDFLAGS diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 5326c88b75..8511284cab 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,13 @@ +Sun Jan 23 22:12:36 2000 Owen Taylor + + * gtk/gtkviewport.c (gtk_viewport_size_allocate): Don't + realize the widget when it is size allocated! + (old, old bug) + + * gtk/gtkviewport.c (gtk_viewport_adjustment_value_changed): + Removed unused call to gdk_window_get_size() that + showed up when the above was fixed. + Sun Jan 23 20:52:40 2000 Owen Taylor * INSTALL: Added short note about setting LDFLAGS diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 5326c88b75..8511284cab 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,13 @@ +Sun Jan 23 22:12:36 2000 Owen Taylor + + * gtk/gtkviewport.c (gtk_viewport_size_allocate): Don't + realize the widget when it is size allocated! + (old, old bug) + + * gtk/gtkviewport.c (gtk_viewport_adjustment_value_changed): + Removed unused call to gdk_window_get_size() that + showed up when the above was fixed. + Sun Jan 23 20:52:40 2000 Owen Taylor * INSTALL: Added short note about setting LDFLAGS diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 5326c88b75..8511284cab 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,13 @@ +Sun Jan 23 22:12:36 2000 Owen Taylor + + * gtk/gtkviewport.c (gtk_viewport_size_allocate): Don't + realize the widget when it is size allocated! + (old, old bug) + + * gtk/gtkviewport.c (gtk_viewport_adjustment_value_changed): + Removed unused call to gdk_window_get_size() that + showed up when the above was fixed. + Sun Jan 23 20:52:40 2000 Owen Taylor * INSTALL: Added short note about setting LDFLAGS diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 5326c88b75..8511284cab 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,13 @@ +Sun Jan 23 22:12:36 2000 Owen Taylor + + * gtk/gtkviewport.c (gtk_viewport_size_allocate): Don't + realize the widget when it is size allocated! + (old, old bug) + + * gtk/gtkviewport.c (gtk_viewport_adjustment_value_changed): + Removed unused call to gdk_window_get_size() that + showed up when the above was fixed. + Sun Jan 23 20:52:40 2000 Owen Taylor * INSTALL: Added short note about setting LDFLAGS diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c index 3f9eab48ce..afffdf01ad 100644 --- a/gtk/gtkviewport.c +++ b/gtk/gtkviewport.c @@ -756,12 +756,10 @@ gtk_viewport_size_allocate (GtkWidget *widget, child_allocation.width = viewport->hadjustment->upper; child_allocation.height = viewport->vadjustment->upper; - if (!GTK_WIDGET_REALIZED (widget)) - gtk_widget_realize (widget); - - gdk_window_resize (viewport->bin_window, - child_allocation.width, - child_allocation.height); + if (GTK_WIDGET_REALIZED (widget)) + gdk_window_resize (viewport->bin_window, + child_allocation.width, + child_allocation.height); child_allocation.x = 0; child_allocation.y = 0; @@ -802,7 +800,6 @@ gtk_viewport_adjustment_value_changed (GtkAdjustment *adjustment, GtkViewport *viewport; GtkBin *bin; GtkAllocation child_allocation; - gint width, height; g_return_if_fail (adjustment != NULL); g_return_if_fail (data != NULL); @@ -813,8 +810,6 @@ gtk_viewport_adjustment_value_changed (GtkAdjustment *adjustment, if (bin->child && GTK_WIDGET_VISIBLE (bin->child)) { - gdk_window_get_size (viewport->view_window, &width, &height); - child_allocation.x = 0; child_allocation.y = 0;