Fix resize of native children

We now set the size to the right value before calling move_resize, so
the check for if the move_resize is just a move broke. Always call
move_resize()
This commit is contained in:
Alexander Larsson 2009-01-20 23:36:03 +01:00 committed by Alexander Larsson
parent 1084b8e6a1
commit b298ebc415

View File

@ -165,13 +165,6 @@ struct _GdkWindowQueueItem
} u; } u;
}; };
static void
move (GdkWindow *window, GdkRectangle *pos)
{
XMoveWindow (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window), pos->x, pos->y);
}
static void static void
move_resize (GdkWindow *window, GdkRectangle *pos) move_resize (GdkWindow *window, GdkRectangle *pos)
{ {
@ -190,7 +183,6 @@ _gdk_window_move_resize_child (GdkWindow *window,
GdkWindowImplX11 *impl; GdkWindowImplX11 *impl;
GdkWindowObject *obj; GdkWindowObject *obj;
GdkRectangle new_info; GdkRectangle new_info;
gboolean is_resize;
g_return_if_fail (window != NULL); g_return_if_fail (window != NULL);
g_return_if_fail (GDK_IS_WINDOW (window)); g_return_if_fail (GDK_IS_WINDOW (window));
@ -198,10 +190,6 @@ _gdk_window_move_resize_child (GdkWindow *window,
impl = GDK_WINDOW_IMPL_X11 (GDK_WINDOW_OBJECT (window)->impl); impl = GDK_WINDOW_IMPL_X11 (GDK_WINDOW_OBJECT (window)->impl);
obj = GDK_WINDOW_OBJECT (window); obj = GDK_WINDOW_OBJECT (window);
is_resize =
width != obj->width ||
height != obj->height;
obj->x = x; obj->x = x;
obj->y = y; obj->y = y;
obj->width = width; obj->width = width;
@ -213,10 +201,7 @@ _gdk_window_move_resize_child (GdkWindow *window,
new_info.height = obj->height; new_info.height = obj->height;
_gdk_x11_window_tmp_unset_parent_bg (window, TRUE); _gdk_x11_window_tmp_unset_parent_bg (window, TRUE);
if (is_resize) move_resize (window, &new_info);
move_resize (window, &new_info);
else
move (window, &new_info);
_gdk_x11_window_tmp_reset_parent_bg (window, TRUE); _gdk_x11_window_tmp_reset_parent_bg (window, TRUE);
} }