Gabriel Ivăncescu : winex11.drv: Map the window in UpdateLayeredWindow.

Alexandre Julliard julliard at winehq.org
Tue Dec 28 15:48:27 CST 2021


Module: wine
Branch: master
Commit: a22dd45a79b80e1496820c7c7b81d9185755ff82
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=a22dd45a79b80e1496820c7c7b81d9185755ff82

Author: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Date:   Wed Dec 22 20:17:03 2021 +0200

winex11.drv: Map the window in UpdateLayeredWindow.

Fixes a regression introduced by 8892b79118fde5f2307ecbbdb03a8d0c489c8b3d,
because set_window_pos is called before UpdateLayeredWindow, which calls
the driver's WindowPosChanged earlier.

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

---

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

diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index 29473ceba06..36fb41ac710 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -2716,7 +2716,7 @@ BOOL CDECL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO
     RECT rect, src_rect;
     HDC hdc = 0;
     HBITMAP dib;
-    BOOL ret = FALSE;
+    BOOL mapped, ret = FALSE;
 
     if (!(data = get_win_data( hwnd ))) return FALSE;
 
@@ -2737,8 +2737,18 @@ BOOL CDECL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO
     else set_surface_color_key( surface, color_key );
 
     if (surface) window_surface_add_ref( surface );
+    mapped = data->mapped;
     release_win_data( data );
 
+    /* layered windows are mapped only once their attributes are set */
+    if (!mapped)
+    {
+        DWORD style = GetWindowLongW( hwnd, GWL_STYLE );
+
+        if ((style & WS_VISIBLE) && ((style & WS_MINIMIZE) || is_window_rect_mapped( window_rect )))
+            map_window( hwnd, style );
+    }
+
     if (!surface) return FALSE;
     if (!info->hdcSrc)
     {




More information about the wine-cvs mailing list