mirror of
https://gitlab.winehq.org/wine/wine.git
synced 2024-11-21 17:09:06 -07:00
winex11: Reset the window relative position when it gets reparented.
Instead of keeping the same offset as from the previous window parent, which may cause offsets to stack up with embedded windows. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57370
This commit is contained in:
parent
51f6839395
commit
4eefc0b9a9
Notes:
Alexandre Julliard
2024-11-14 23:13:45 +01:00
Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/wine/merge_requests/6815
1 changed files with 6 additions and 1 deletions
|
@ -2320,7 +2320,12 @@ void set_window_parent( struct x11drv_win_data *data, Window parent )
|
||||||
if (!data->whole_window) return; /* only keep track of parent if we have a toplevel */
|
if (!data->whole_window) return; /* only keep track of parent if we have a toplevel */
|
||||||
TRACE( "window %p/%lx, parent %lx\n", data->hwnd, data->whole_window, parent );
|
TRACE( "window %p/%lx, parent %lx\n", data->hwnd, data->whole_window, parent );
|
||||||
host_window_reparent( &data->parent, parent, data->whole_window );
|
host_window_reparent( &data->parent, parent, data->whole_window );
|
||||||
if (data->parent) host_window_configure_child( data->parent, data->whole_window, data->rects.visible, TRUE );
|
if (data->parent)
|
||||||
|
{
|
||||||
|
RECT rect = data->rects.visible;
|
||||||
|
OffsetRect( &rect, -rect.left, -rect.top );
|
||||||
|
host_window_configure_child( data->parent, data->whole_window, rect, TRUE );
|
||||||
|
}
|
||||||
data->parent_invalid = 0;
|
data->parent_invalid = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue