summaryrefslogtreecommitdiff
path: root/gtk/gtkviewport.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@src.gnome.org>2000-03-14 19:57:25 +0000
committerOwen Taylor <otaylor@src.gnome.org>2000-03-14 19:57:25 +0000
commit10ba4fd066042b4335ae45e7560565872f71ba9b (patch)
tree17f68ffb0d402b6e66bb891d4a7d9a02a9b6108b /gtk/gtkviewport.c
parent3f98a849c70ae570b78095cef0152a33ec07c64e (diff)
downloadgdk-pixbuf-10ba4fd066042b4335ae45e7560565872f71ba9b.tar.gz
Merges from gtk-1-2
Diffstat (limited to 'gtk/gtkviewport.c')
-rw-r--r--gtk/gtkviewport.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index 3f9eab48c..afffdf01a 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;