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

This commit is contained in:
Alexandre Julliard 2008-09-09 11:33:06 +02:00
parent d23fc94fd6
commit d3f4fb4929
1 changed files with 5 additions and 2 deletions

View File

@ -2187,13 +2187,16 @@ BOOL WINAPI EndDeferWindowPos( HDWP hdwp )
pDWP = (DWP *) USER_HEAP_LIN_ADDR( hdwp ); pDWP = (DWP *) USER_HEAP_LIN_ADDR( hdwp );
if (!pDWP) return FALSE; 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", TRACE("hwnd %p, after %p, %d,%d (%dx%d), flags %08x\n",
winpos->hwnd, winpos->hwndInsertAfter, winpos->x, winpos->y, winpos->hwnd, winpos->hwndInsertAfter, winpos->x, winpos->y,
winpos->cx, winpos->cy, winpos->flags); 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 ); USER_HEAP_FREE( hdwp );
return res; return res;