Alexandre Julliard : user32: Fix DeferWindowPos to work on windows belonging to other processes.

Alexandre Julliard julliard at winehq.org
Tue Sep 9 05:50:56 CDT 2008


Module: wine
Branch: master
Commit: d3f4fb4929284085b8d634f932299e672eaa692e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d3f4fb4929284085b8d634f932299e672eaa692e

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Sep  9 11:33:06 2008 +0200

user32: Fix DeferWindowPos to work on windows belonging to other processes.

---

 dlls/user32/winpos.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c
index 2bbaab9..21e1554 100644
--- a/dlls/user32/winpos.c
+++ b/dlls/user32/winpos.c
@@ -2187,13 +2187,16 @@ BOOL WINAPI EndDeferWindowPos( HDWP hdwp )
 
     pDWP = (DWP *) USER_HEAP_LIN_ADDR( hdwp );
     if (!pDWP) return FALSE;
-    for (i = 0, winpos = pDWP->winPos; i < pDWP->actualCount; i++, winpos++)
+    for (i = 0, winpos = pDWP->winPos; res && i < pDWP->actualCount; i++, winpos++)
     {
         TRACE("hwnd %p, after %p, %d,%d (%dx%d), flags %08x\n",
                winpos->hwnd, winpos->hwndInsertAfter, winpos->x, winpos->y,
                winpos->cx, winpos->cy, winpos->flags);
 
-        if (!(res = USER_SetWindowPos( winpos ))) break;
+        if (WIN_IsCurrentThread( winpos->hwnd ))
+            res = USER_SetWindowPos( winpos );
+        else
+            res = SendMessageW( winpos->hwnd, WM_WINE_SETWINDOWPOS, 0, (LPARAM)winpos );
     }
     USER_HEAP_FREE( hdwp );
     return res;




More information about the wine-cvs mailing list