From 6ba980d9eb23806fddd88be73af1b62d1dd3ead0 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Thu, 25 May 2000 15:46:53 +0000 Subject: Fixed a bug where we were resizing a non-existent window. 2000-05-25 Christopher James Lahey * widgets/e-paned/e-hpaned.c, widgets/e-paned/e-vpaned.c: Fixed a bug where we were resizing a non-existent window. svn path=/trunk/; revision=3200 --- widgets/e-paned/e-hpaned.c | 11 ++++++----- widgets/e-paned/e-vpaned.c | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'widgets') diff --git a/widgets/e-paned/e-hpaned.c b/widgets/e-paned/e-hpaned.c index 0729e7c84e..0f4184ff57 100644 --- a/widgets/e-paned/e-hpaned.c +++ b/widgets/e-paned/e-hpaned.c @@ -193,12 +193,13 @@ e_hpaned_size_allocate (GtkWidget *widget, child2_requisition.width); /* Move the handle before the children so we don't get extra expose events */ + + if (GTK_WIDGET_REALIZED (widget)) + gdk_window_move_resize (widget->window, + allocation->x, allocation->y, + allocation->width, + allocation->height); - gdk_window_move_resize (widget->window, - allocation->x, allocation->y, - allocation->width, - allocation->height); - handle_shown = e_paned_handle_shown(paned); if (handle_shown) { diff --git a/widgets/e-paned/e-vpaned.c b/widgets/e-paned/e-vpaned.c index 9eb9407a23..bc9ef41e78 100644 --- a/widgets/e-paned/e-vpaned.c +++ b/widgets/e-paned/e-vpaned.c @@ -193,10 +193,11 @@ e_vpaned_size_allocate (GtkWidget *widget, /* Move the handle before the children so we don't get extra expose events */ - gdk_window_move_resize (widget->window, - allocation->x, allocation->y, - allocation->width, - allocation->height); + if (GTK_WIDGET_REALIZED (widget)) + gdk_window_move_resize (widget->window, + allocation->x, allocation->y, + allocation->width, + allocation->height); handle_shown = e_paned_handle_shown(paned); if (handle_shown) @@ -206,7 +207,7 @@ e_vpaned_size_allocate (GtkWidget *widget, paned->handle_width = MAX (1, (gint) widget->allocation.width - 2 * border_width); paned->handle_height = paned->handle_size; - if (GTK_WIDGET_REALIZED(widget)) + if (GTK_WIDGET_REALIZED (widget)) { gdk_window_move_resize (paned->handle, paned->handle_xpos, -- cgit v1.2.3