summaryrefslogtreecommitdiff
path: root/gtk/gtkvpaned.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2008-09-16 04:51:56 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2008-09-16 04:51:56 +0000
commitda8dac8320e7584164ad39e6bcb847e2df6696ae (patch)
tree068631fbdaa9fa778c13d0c3b8c7222194f46655 /gtk/gtkvpaned.c
parenta05204154c2f603f4a8a056466bd267274c96ba9 (diff)
downloadgtk+-da8dac8320e7584164ad39e6bcb847e2df6696ae.tar.gz
Bug 551987 – GtkPaned redrawing problem
2008-09-16 Matthias Clasen <mclasen@redhat.com> Bug 551987 – GtkPaned redrawing problem * gtk/gtkhpaned.c: * gtk/gtkvpaned.c: Queue invalidations when the handle is moved due to child changes. Patch by Owen Taylor svn path=/trunk/; revision=21399
Diffstat (limited to 'gtk/gtkvpaned.c')
-rw-r--r--gtk/gtkvpaned.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gtk/gtkvpaned.c b/gtk/gtkvpaned.c
index 335d4352da..3b11db6d34 100644
--- a/gtk/gtkvpaned.c
+++ b/gtk/gtkvpaned.c
@@ -125,6 +125,7 @@ gtk_vpaned_size_allocate (GtkWidget *widget,
GtkRequisition child2_requisition;
GtkAllocation child1_allocation;
GtkAllocation child2_allocation;
+ GdkRectangle old_handle_pos;
gint handle_size;
gtk_widget_style_get (widget, "handle-size", &handle_size, NULL);
@@ -139,11 +140,21 @@ gtk_vpaned_size_allocate (GtkWidget *widget,
child1_requisition.height,
child2_requisition.height);
+ old_handle_pos = paned->handle_pos;
+
paned->handle_pos.x = widget->allocation.x + border_width;
paned->handle_pos.y = widget->allocation.y + paned->child1_size + border_width;
paned->handle_pos.width = MAX (1, (gint) widget->allocation.width - 2 * border_width);
paned->handle_pos.height = handle_size;
+ if (GTK_WIDGET_MAPPED (widget) &&
+ (old_handle_pos.x != paned->handle_pos.x || old_handle_pos.y != paned->handle_pos.y ||
+ old_handle_pos.width != paned->handle_pos.width || old_handle_pos.height != paned->handle_pos.height))
+ {
+ gdk_window_invalidate_rect (widget->window, &old_handle_pos, FALSE);
+ gdk_window_invalidate_rect (widget->window, &paned->handle_pos, FALSE);
+ }
+
if (GTK_WIDGET_REALIZED (widget))
{
if (GTK_WIDGET_MAPPED (widget))