WM_WINDOWPOSCHANGED should always contain a final window position

Dmitry Timoshkov dmitry at baikal.ru
Wed Jun 23 05:46:54 CDT 2004


Hello,

this patch fixes a bug in x11drv which sends WM_WINDOWPOSCHANGED,
but forgets to update WINDOWPOS to a final window position.

The bug was revealed by (not yet committed) MDI activation fixes.

Changelog:
    Dmitry Timoshkov <dmitry at codeweavers.com>
    WM_WINDOWPOSCHANGED should always contain a final window position.

--- cvs/hq/wine/dlls/x11drv/winpos.c	Wed Jun 23 15:42:34 2004
+++ wine/dlls/x11drv/winpos.c	Wed Jun 23 19:30:45 2004
@@ -1096,8 +1096,16 @@ BOOL X11DRV_SetWindowPos( WINDOWPOS *win
     TRACE("\tstatus flags = %04x\n", winpos->flags & SWP_AGG_STATUSFLAGS);
 
     if (((winpos->flags & SWP_AGG_STATUSFLAGS) != SWP_AGG_NOPOSCHANGE))
-        SendMessageA( winpos->hwnd, WM_WINDOWPOSCHANGED, 0, (LPARAM)winpos );
-        /* WM_WINDOWPOSCHANGED is send even if SWP_NOSENDCHANGING is set */
+    {
+        /* WM_WINDOWPOSCHANGED is sent even if SWP_NOSENDCHANGING is set
+           and always contains final window position.
+         */
+        winpos->x = newWindowRect.left;
+        winpos->y = newWindowRect.top;
+        winpos->cx = newWindowRect.right - newWindowRect.left;
+        winpos->cy = newWindowRect.bottom - newWindowRect.top;
+        SendMessageW( winpos->hwnd, WM_WINDOWPOSCHANGED, 0, (LPARAM)winpos );
+    }
 
     return TRUE;
 }






More information about the wine-patches mailing list