x11drv: CreateWindow should not activate invisible windows

Vitaliy Margolen wine-patch at kievinfo.com
Sun Oct 16 16:28:54 CDT 2005


Now if I would of known what that 0x8000 flag is, that is sent to SetWindowPos.

Vitaliy Margolen

changelog:
  x11drv:
  - CreateWindow should not activate invisible windows
-------------- next part --------------
Index: dlls/x11drv/window.c
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/window.c,v
retrieving revision 1.116
diff -u -p -r1.116 window.c
--- dlls/x11drv/window.c	22 Aug 2005 09:14:21 -0000	1.116
+++ dlls/x11drv/window.c	16 Oct 2005 20:54:22 -0000
@@ -1020,9 +1020,11 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CRE
         UINT swFlag = (style & WS_MINIMIZE) ? SW_MINIMIZE : SW_MAXIMIZE;
         WIN_SetStyle( hwnd, 0, WS_MAXIMIZE | WS_MINIMIZE );
         WINPOS_MinMaximize( hwnd, swFlag, &newPos );
-        swFlag = ((style & WS_CHILD) || GetActiveWindow())
-            ? SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED
-            : SWP_NOZORDER | SWP_FRAMECHANGED;
+
+        swFlag  = SWP_FRAMECHANGED; /* Frame always gets changed */
+        swFlag |= style & WS_VISIBLE ? SWP_NOZORDER : SWP_NOACTIVATE;
+        swFlag |= ((style & WS_CHILD) || GetActiveWindow()) ? SWP_NOACTIVATE : 0;
+
         SetWindowPos( hwnd, 0, newPos.left, newPos.top,
                       newPos.right, newPos.bottom, swFlag );
     }


More information about the wine-patches mailing list