app: don't leave artifacts on the box when a child changes its size
gimp_overlay_child_size_allocate(): invalidate the child's old area before moving its window around.
This commit is contained in:
@ -236,11 +236,28 @@ gimp_overlay_child_size_allocate (GimpOverlayBox *box,
|
||||
gtk_widget_get_allocation (child->widget, &child_allocation);
|
||||
|
||||
if (GTK_WIDGET_REALIZED (widget))
|
||||
{
|
||||
GdkRectangle old_allocation;
|
||||
GdkRectangle old_bounds;
|
||||
|
||||
gdk_window_get_position (child->window,
|
||||
&old_allocation.x,
|
||||
&old_allocation.y);
|
||||
gdk_drawable_get_size (child->window,
|
||||
&old_allocation.width,
|
||||
&old_allocation.height);
|
||||
|
||||
gimp_overlay_child_transform_bounds (child, &old_allocation, &old_bounds);
|
||||
|
||||
gdk_window_invalidate_rect (gtk_widget_get_window (widget),
|
||||
&old_bounds, FALSE);
|
||||
|
||||
gdk_window_move_resize (child->window,
|
||||
child_allocation.x,
|
||||
child_allocation.y,
|
||||
child_allocation.width,
|
||||
child_allocation.height);
|
||||
}
|
||||
|
||||
cairo_matrix_init_identity (&child->matrix);
|
||||
|
||||
|
Reference in New Issue
Block a user