Do nothing in ShowWindow(SW_SHOW) if a window is already visible

Dmitry Timoshkov dmitry at baikal.ru
Wed Jun 9 01:19:20 CDT 2004


Hello,

this patch does the same thing for SW_SHOW as now done for SW_HIDE.

Changelog:
    Dmitry Timoshkov <dmitry at codeweavers.com>
    Do nothing in ShowWindow(SW_SHOW) if a window is already visible.

--- cvs/hq/wine/dlls/x11drv/winpos.c	2004-06-04 16:22:38.000000000 +0900
+++ wine/dlls/x11drv/winpos.c	2004-06-08 18:57:52.000000000 +0900
@@ -1276,10 +1276,10 @@ BOOL X11DRV_ShowWindow( HWND hwnd, INT c
     if (!wndPtr) return FALSE;
     hwnd = wndPtr->hwndSelf;  /* make it a full handle */
 
-    TRACE("hwnd=%p, cmd=%d\n", hwnd, cmd);
-
     wasVisible = (wndPtr->dwStyle & WS_VISIBLE) != 0;
 
+    TRACE("hwnd=%p, cmd=%d, wasVisible %d\n", hwnd, cmd, wasVisible);
+
     switch(cmd)
     {
         case SW_HIDE:
@@ -1313,6 +1313,8 @@ BOOL X11DRV_ShowWindow( HWND hwnd, INT c
             swp |= SWP_NOACTIVATE | SWP_NOZORDER;
             /* fall through */
 	case SW_SHOW:
+            if (wasVisible) goto END;
+
 	    swp |= SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE;
 
 	    /*






More information about the wine-patches mailing list