Move all native children (recursively) in gdk_window_scroll

This commit is contained in:
Alexander Larsson 2008-12-18 11:43:57 +01:00 committed by Alexander Larsson
parent f6e1b0ac17
commit 4442463481
2 changed files with 5 additions and 22 deletions

View File

@ -5814,20 +5814,14 @@ gdk_window_scroll (GdkWindow *window,
GdkWindow *child = GDK_WINDOW (tmp_list->data);
GdkWindowObject *child_obj = GDK_WINDOW_OBJECT (child);
if (child_obj->impl == private->impl)
{
/* Just update the positions, the bits will move with the copy */
child_obj->x += dx;
child_obj->y += dy;
}
else
{
/* Native window, need to move it */
GDK_WINDOW_IMPL_GET_IFACE (private->impl)->move_resize (window, TRUE, child_obj->x + dx, child_obj->y + dy, -1, -1);
}
/* Just update the positions, the bits will move with the copy */
child_obj->x += dx;
child_obj->y += dy;
tmp_list = tmp_list->next;
}
move_native_children (private);
recompute_visible_regions (private, FALSE, TRUE);

View File

@ -201,17 +201,6 @@ _gdk_window_move_resize_child (GdkWindow *window,
impl = GDK_WINDOW_IMPL_X11 (GDK_WINDOW_OBJECT (window)->impl);
obj = GDK_WINDOW_OBJECT (window);
dx = x - obj->x;
dy = y - obj->y;
is_move = dx != 0 || dy != 0;
is_resize = obj->width != width || obj->height != height;
#if 0 /* Not right, doesn't take abs_x/y into consideration */
if (!is_move && !is_resize)
return;
#endif
obj->x = x;
obj->y = y;
obj->width = width;