WM_WINDOWPOSCHANGING should recieve original, not fixed values

Dmitry Timoshkov dmitry at baikal.ru
Mon Nov 3 07:57:40 CST 2003


Hello,

Changelog:
    Dmitry Timoshkov <dmitry at codeweavers.com>
    WM_WINDOWPOSCHANGING should recieve original, not fixed values.

--- cvs/hq/wine/dlls/x11drv/winpos.c	Thu Sep 18 10:44:20 2003
+++ wine/dlls/x11drv/winpos.c	Mon Nov  3 21:19:34 2003
@@ -551,12 +551,12 @@ static BOOL SWP_DoWinPosChanging( WINDOW
 {
     WND *wndPtr;
 
+    if (!(wndPtr = WIN_GetPtr( pWinpos->hwnd )) || wndPtr == WND_OTHER_PROCESS) return FALSE;
+
     /* Send WM_WINDOWPOSCHANGING message */
 
     if (!(pWinpos->flags & SWP_NOSENDCHANGING))
-        SendMessageA( pWinpos->hwnd, WM_WINDOWPOSCHANGING, 0, (LPARAM)pWinpos );
-
-    if (!(wndPtr = WIN_GetPtr( pWinpos->hwnd )) || wndPtr == WND_OTHER_PROCESS) return FALSE;
+        SendMessageA( wndPtr->hwndSelf, WM_WINDOWPOSCHANGING, 0, (LPARAM)pWinpos );
 
     /* Calculate new position and size */
 
@@ -894,20 +894,20 @@ BOOL X11DRV_SetWindowPos( WINDOWPOS *win
     UINT wvrFlags = 0;
     BOOL bChangePos;
 
-    TRACE( "hwnd %p, swp (%i,%i)-(%i,%i) flags %08x\n",
-           winpos->hwnd, winpos->x, winpos->y,
-           winpos->x + winpos->cx, winpos->y + winpos->cy, winpos->flags);
+    TRACE( "hwnd %p, after %p, swp %d,%d %dx%d flags %08x\n",
+           winpos->hwnd, winpos->hwndInsertAfter, winpos->x, winpos->y,
+           winpos->cx, winpos->cy, winpos->flags);
 
     bChangePos = !(winpos->flags & SWP_WINE_NOHOSTMOVE);
     winpos->flags &= ~SWP_WINE_NOHOSTMOVE;
 
-    /* Fix redundant flags */
-    if (!fixup_flags( winpos )) return FALSE;
-
     /* Check window handle */
     if (winpos->hwnd == GetDesktopWindow()) return FALSE;
 
-    SWP_DoWinPosChanging( winpos, &newWindowRect, &newClientRect );
+    if (!SWP_DoWinPosChanging( winpos, &newWindowRect, &newClientRect )) return FALSE;
+
+    /* Fix redundant flags */
+    if (!fixup_flags( winpos )) return FALSE;
 
     if (!(wndPtr = WIN_FindWndPtr( winpos->hwnd ))) return FALSE;
 






More information about the wine-patches mailing list