[PATCH] winex11.drv: Let the Window Manager handle the off-screen window if it's managed.

Gabriel Ivăncescu gabrielopcode at gmail.com
Wed Oct 14 08:20:08 CDT 2020


Some applications control their own position when they are being moved. This
means WindowPosChanged is called without an event.

Window Managers have their own way to deal with offscreen windows, and we
have to respect that, if the window is managed. So let the WM handle this
situation instead of unmapping the window ourselves.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=15346
Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
---

Note that this bug doesn't happen for unmanaged windows.

 dlls/winex11.drv/window.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index 4571739..424acee 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -2458,8 +2458,10 @@ void CDECL X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags
             (!event_type && !(new_style & WS_MINIMIZE) &&
              !is_window_rect_mapped( rectWindow ) && is_window_rect_mapped( &old_window_rect )))
         {
+            BOOL managed = data->managed;
+
             release_win_data( data );
-            unmap_window( hwnd );
+            if (!managed) unmap_window( hwnd );
             if (is_window_rect_full_screen( &old_window_rect )) reset_clipping_window();
             if (!(data = get_win_data( hwnd ))) return;
         }
-- 
2.21.0




More information about the wine-devel mailing list