#2: Setting WS_VISIBLE style does not require any special handling

Dmitry Timoshkov dmitry at baikal.ru
Thu Apr 1 08:41:37 CST 2004


Hello,

setting WS_VISIBLE style leads to nothing but a mess under Windows.
Windows starts to think that a window is visible while it doesn't.
All subsequent ShowWindow calls do not do a window visible.

Please apply after #1.

Changelog:
    Dmitry Timoshkov <dmitry at codeweavers.com>
    Setting WS_VISIBLE style does not require any special handling.

diff -u cvs/hq/wine/dlls/x11drv/window.c wine/dlls/x11drv/window.c
--- cvs/hq/wine/dlls/x11drv/window.c	2004-03-04 12:57:54.000000000 +0800
+++ wine_hq_src/dlls/x11drv/window.c	2004-04-01 20:42:18.000000000 +0900
@@ -1116,14 +1116,9 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CRE
                       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 -u cvs/hq/wine/windows/win.c wine/windows/win.c
--- cvs/hq/wine/windows/win.c	2004-04-01 22:40:00.000000000 +0900
+++ wine/windows/win.c	2004-04-01 22:43:57.000000000 +0900
@@ -1230,13 +1230,7 @@ static HWND WIN_CreateWindowEx( CREATEST
     }
 
     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 */
 






More information about the wine-patches mailing list