user32: Fix error handling in EndDeferWindowPos.

Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rodrigo Rivas Costa 2017-02-16 21:59:39 +01:00 committed by Alexandre Julliard
parent 6f62f9614d
commit fbd9ed0dee
2 changed files with 4 additions and 6 deletions

View File

@ -9539,7 +9539,6 @@ todo_wine
DestroyWindow(hwnd);
ret = EndDeferWindowPos(hdwp);
todo_wine
ok(ret, "got %d\n", ret);
}

View File

@ -2430,7 +2430,6 @@ BOOL WINAPI EndDeferWindowPos( HDWP hdwp )
{
DWP *pDWP;
WINDOWPOS *winpos;
BOOL res = TRUE;
int i;
TRACE("%p\n", hdwp);
@ -2442,20 +2441,20 @@ BOOL WINAPI EndDeferWindowPos( HDWP hdwp )
return FALSE;
}
for (i = 0, winpos = pDWP->winPos; res && i < pDWP->actualCount; i++, winpos++)
for (i = 0, winpos = pDWP->winPos; 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 (WIN_IsCurrentThread( winpos->hwnd ))
res = USER_SetWindowPos( winpos );
USER_SetWindowPos( winpos );
else
res = SendMessageW( winpos->hwnd, WM_WINE_SETWINDOWPOS, 0, (LPARAM)winpos );
SendMessageW( winpos->hwnd, WM_WINE_SETWINDOWPOS, 0, (LPARAM)winpos );
}
HeapFree( GetProcessHeap(), 0, pDWP->winPos );
HeapFree( GetProcessHeap(), 0, pDWP );
return res;
return TRUE;
}