From: Rémi Bernon rbernon@codeweavers.com
We offset the rect to right before to use parent-relative coordinates, we need to tell host_window_configure_child it's relative to the parent.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57525 --- dlls/winex11.drv/window.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 4671ed0fda3..d109d6a744e 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -208,6 +208,9 @@ static void host_window_reparent( struct host_window **win, Window parent, Windo old->children_count--; }
+ TRACE( "parent %lx, window %lx, rect %s, old %p/%lx -> new %p/%lx\n", parent, window, + wine_dbgstr_rect(&rect), old, old ? old->window : 0, new, new ? new->window : 0 ); + if (new && (index = find_host_window_child( new, window )) == new->children_count) { if (!(tmp = realloc( new->children, (index + 1) * sizeof(*new->children) ))) return; @@ -227,6 +230,9 @@ RECT host_window_configure_child( struct host_window *win, Window window, RECT r { unsigned int index;
+ TRACE( "host win %p/%lx, window %lx, rect %s, root_coords %u\n", win, win->window, + window, wine_dbgstr_rect(&rect), root_coords ); + if (root_coords) { POINT offset = host_window_map_point( win, 0, 0 ); @@ -2479,7 +2485,7 @@ void set_window_parent( struct x11drv_win_data *data, Window parent ) { RECT rect = data->rects.visible; OffsetRect( &rect, -rect.left, -rect.top ); - host_window_configure_child( data->parent, data->whole_window, rect, TRUE ); + host_window_configure_child( data->parent, data->whole_window, rect, FALSE ); } data->parent_invalid = 0; }