Piotr Caban : user32: Simplify CreateWindow condition for setting WS_EX_WINDOWEDGE style.

Alexandre Julliard julliard at winehq.org
Thu Oct 7 16:21:21 CDT 2021


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

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Thu Oct  7 16:33:52 2021 +0200

user32: Simplify CreateWindow condition for setting WS_EX_WINDOWEDGE style.

Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/user32/win.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/dlls/user32/win.c b/dlls/user32/win.c
index 7c2471d2746..d261968d742 100644
--- a/dlls/user32/win.c
+++ b/dlls/user32/win.c
@@ -1653,16 +1653,9 @@ HWND WIN_CreateWindowEx( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE module,
     }
 
     /* WS_EX_WINDOWEDGE depends on some other styles */
-    if (wndPtr->dwExStyle & WS_EX_DLGMODALFRAME)
+    if ((wndPtr->dwStyle & (WS_DLGFRAME | WS_THICKFRAME)) &&
+            !(wndPtr->dwStyle & (WS_CHILD | WS_POPUP)))
         wndPtr->dwExStyle |= WS_EX_WINDOWEDGE;
-    else if (wndPtr->dwStyle & (WS_DLGFRAME | WS_THICKFRAME))
-    {
-        if (!((wndPtr->dwExStyle & WS_EX_STATICEDGE) &&
-            (wndPtr->dwStyle & (WS_CHILD | WS_POPUP))))
-            wndPtr->dwExStyle |= WS_EX_WINDOWEDGE;
-    }
-    else
-        wndPtr->dwExStyle &= ~WS_EX_WINDOWEDGE;
 
     if (!(wndPtr->dwStyle & (WS_CHILD | WS_POPUP)))
         wndPtr->flags |= WIN_NEED_SIZE;




More information about the wine-cvs mailing list