From 0ad1a6c6dded8c40e942ba090159a43314fe4a3f Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@codeweavers.com>
Date: Fri, 2 Apr 2004 20:12:38 +0000
Subject: [PATCH] Setting WS_VISIBLE style does not require any special
 handling.

---
 dlls/x11drv/window.c | 5 -----
 windows/win.c        | 6 ------
 2 files changed, 11 deletions(-)

diff --git a/dlls/x11drv/window.c b/dlls/x11drv/window.c
index 78de26987d6..7c7a6e1fbb7 100644
--- a/dlls/x11drv/window.c
+++ b/dlls/x11drv/window.c
@@ -1116,14 +1116,9 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode )
                       newPos.right, newPos.bottom, swFlag );
     }
 
-    /* if the window was made visible set create struct flag so that
-     * we do a proper ShowWindow later on */
-    if (wndPtr->dwStyle & WS_VISIBLE) cs->style |= WS_VISIBLE;
-
     WIN_ReleaseWndPtr( wndPtr );
     return TRUE;
 
-
  failed:
     X11DRV_DestroyWindow( hwnd );
     if (wndPtr) WIN_ReleasePtr( wndPtr );
diff --git a/windows/win.c b/windows/win.c
index 35761e0e210..a99288a7fb6 100644
--- a/windows/win.c
+++ b/windows/win.c
@@ -1230,13 +1230,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
     }
 
     if (cs->style & WS_VISIBLE)
-    {
-        /* in case WS_VISIBLE got set in the meantime */
-        if (!(wndPtr = WIN_GetPtr( hwnd ))) return 0;
-        WIN_SetStyle( hwnd, wndPtr->dwStyle & ~WS_VISIBLE );
-        WIN_ReleasePtr( wndPtr );
         ShowWindow( hwnd, sw );
-    }
 
     /* Call WH_SHELL hook */
 
-- 
GitLab