mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 11:20:12 +00:00
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:
parent
1084b8e6a1
commit
b298ebc415
@ -165,13 +165,6 @@ struct _GdkWindowQueueItem
|
||||
} u;
|
||||
};
|
||||
|
||||
static void
|
||||
move (GdkWindow *window, GdkRectangle *pos)
|
||||
{
|
||||
XMoveWindow (GDK_WINDOW_XDISPLAY (window),
|
||||
GDK_WINDOW_XID (window), pos->x, pos->y);
|
||||
}
|
||||
|
||||
static void
|
||||
move_resize (GdkWindow *window, GdkRectangle *pos)
|
||||
{
|
||||
@ -190,7 +183,6 @@ _gdk_window_move_resize_child (GdkWindow *window,
|
||||
GdkWindowImplX11 *impl;
|
||||
GdkWindowObject *obj;
|
||||
GdkRectangle new_info;
|
||||
gboolean is_resize;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
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);
|
||||
obj = GDK_WINDOW_OBJECT (window);
|
||||
|
||||
is_resize =
|
||||
width != obj->width ||
|
||||
height != obj->height;
|
||||
|
||||
obj->x = x;
|
||||
obj->y = y;
|
||||
obj->width = width;
|
||||
@ -213,10 +201,7 @@ _gdk_window_move_resize_child (GdkWindow *window,
|
||||
new_info.height = obj->height;
|
||||
|
||||
_gdk_x11_window_tmp_unset_parent_bg (window, TRUE);
|
||||
if (is_resize)
|
||||
move_resize (window, &new_info);
|
||||
else
|
||||
move (window, &new_info);
|
||||
move_resize (window, &new_info);
|
||||
_gdk_x11_window_tmp_reset_parent_bg (window, TRUE);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user