Hi

This patch fixes a problem I encountered during the installation process of 
The Longest Journey. I dialog box popped up briefly and disappeared before I 
could read it, locking my application. It appeared that the dialog box, which 
is modal, was sent to the background.

Please comment and apply if appropriate.

Laurent Pinchart
--- dlls/x11drv/winpos.c	Thu Nov  8 00:19:42 2001
+++ dlls/x11drv/winpos.c	Tue Dec 25 16:57:58 2001
@@ -729,13 +729,24 @@
         }
     }
 
+    /* (From MSDN) SWP_NOACTIVATE:
+     * Does not activate the window. If this flag is not set, the window is activated
+     * and moved to the top of either the topmost or non-topmost group (depending on
+     * the setting of the hWndInsertAfter parameter).
+     *
+     * It seems to imply that if set, the window z-order is not changed, and thus to
+     * imply SWP_ZORDER.
+     */
+    if (winpos->flags & SWP_NOACTIVATE)
+	winpos->flags |= SWP_NOZORDER;
+
     /* Check hwndInsertAfter */
 
     /* fix sign extension */
     if (winpos->hwndInsertAfter == (HWND)0xffff) winpos->hwndInsertAfter = HWND_TOPMOST;
     else if (winpos->hwndInsertAfter == (HWND)0xfffe) winpos->hwndInsertAfter = HWND_NOTOPMOST;
 
-      /* FIXME: TOPMOST not supported yet */
+    /* FIXME: TOPMOST not supported yet */
     if ((winpos->hwndInsertAfter == HWND_TOPMOST) ||
         (winpos->hwndInsertAfter == HWND_NOTOPMOST)) winpos->hwndInsertAfter = HWND_TOP;
 

Reply via email to