Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57472
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57474
-- v2: winex11: Don't update Win32 window position for offscreen windows.
From: Rémi Bernon rbernon@codeweavers.com
The window manager might decide to move window outside of what we believe is the virtual screen, for instance to implement virtual desktops, or for embedded windows.
We don't need to tell Win32 about it, as it will otherwise end up triggering the offscreen window logic in WindowPosChanged. We want to keep that offscreen window logic for windows which are moved offscreen by applications to hide them.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57472 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57474 --- dlls/winex11.drv/window.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 1a341adc921..b99c96f644b 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1593,6 +1593,9 @@ static UINT window_update_client_config( struct x11drv_win_data *data ) if (rect.right == old_rect.right && rect.bottom == old_rect.bottom) flags |= SWP_NOSIZE; else if (IsRectEmpty( &rect )) flags |= SWP_NOSIZE;
+ /* don't sync win32 position for offscreen windows */ + if (!is_window_rect_mapped( &new_rect )) flags |= SWP_NOMOVE; + if ((flags & (SWP_NOSIZE | SWP_NOMOVE)) == (SWP_NOSIZE | SWP_NOMOVE)) return 0;
/* avoid event feedback loops from window rect adjustments of maximized / fullscreen windows */
Updated to a simpler change which I believe still works. We can simply avoid telling the Win32 side of the window position change when they are offscreen. This is only for when the window manager itself moves them offscreen, and it avoids getting back into WindowPosChanged and triggering that offscreen window hiding logic.