diff options
author | Matthias Clasen <mclasen@redhat.com> | 2008-09-16 04:51:56 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2008-09-16 04:51:56 +0000 |
commit | da8dac8320e7584164ad39e6bcb847e2df6696ae (patch) | |
tree | 068631fbdaa9fa778c13d0c3b8c7222194f46655 /gtk/gtkhpaned.c | |
parent | a05204154c2f603f4a8a056466bd267274c96ba9 (diff) | |
download | gtk+-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/gtkhpaned.c')
-rw-r--r-- | gtk/gtkhpaned.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gtk/gtkhpaned.c b/gtk/gtkhpaned.c index 365a53f560..f719d3dfed 100644 --- a/gtk/gtkhpaned.c +++ b/gtk/gtkhpaned.c @@ -130,6 +130,7 @@ gtk_hpaned_size_allocate (GtkWidget *widget, GtkAllocation child2_allocation; GtkRequisition child1_requisition; GtkRequisition child2_requisition; + GdkRectangle old_handle_pos; gint handle_size; gtk_widget_style_get (widget, "handle-size", &handle_size, NULL); @@ -143,6 +144,8 @@ gtk_hpaned_size_allocate (GtkWidget *widget, - 2 * border_width), child1_requisition.width, child2_requisition.width); + + old_handle_pos = paned->handle_pos; paned->handle_pos.x = widget->allocation.x + paned->child1_size + border_width; paned->handle_pos.y = widget->allocation.y + border_width; @@ -164,6 +167,14 @@ gtk_hpaned_size_allocate (GtkWidget *widget, flip_child (widget, &(paned->handle_pos)); } + 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)) |