Commit fbd9ed0d authored by Rodrigo Rivas Costa's avatar Rodrigo Rivas Costa Committed by Alexandre Julliard

user32: Fix error handling in EndDeferWindowPos.

parent 6f62f961
...@@ -9539,7 +9539,6 @@ todo_wine ...@@ -9539,7 +9539,6 @@ todo_wine
DestroyWindow(hwnd); DestroyWindow(hwnd);
ret = EndDeferWindowPos(hdwp); ret = EndDeferWindowPos(hdwp);
todo_wine
ok(ret, "got %d\n", ret); ok(ret, "got %d\n", ret);
} }
......
...@@ -2430,7 +2430,6 @@ BOOL WINAPI EndDeferWindowPos( HDWP hdwp ) ...@@ -2430,7 +2430,6 @@ BOOL WINAPI EndDeferWindowPos( HDWP hdwp )
{ {
DWP *pDWP; DWP *pDWP;
WINDOWPOS *winpos; WINDOWPOS *winpos;
BOOL res = TRUE;
int i; int i;
TRACE("%p\n", hdwp); TRACE("%p\n", hdwp);
...@@ -2442,20 +2441,20 @@ BOOL WINAPI EndDeferWindowPos( HDWP hdwp ) ...@@ -2442,20 +2441,20 @@ BOOL WINAPI EndDeferWindowPos( HDWP hdwp )
return FALSE; 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", 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 (WIN_IsCurrentThread( winpos->hwnd )) if (WIN_IsCurrentThread( winpos->hwnd ))
res = USER_SetWindowPos( winpos ); USER_SetWindowPos( winpos );
else 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->winPos );
HeapFree( GetProcessHeap(), 0, pDWP ); HeapFree( GetProcessHeap(), 0, pDWP );
return res; return TRUE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment