[PATCH 5/7] user32: Set error from set_parent and set_window_pos server calls.
Rémi Bernon
rbernon at codeweavers.com
Fri Oct 15 04:48:00 CDT 2021
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
dlls/user32/tests/win.c | 4 ----
dlls/user32/win.c | 2 +-
dlls/user32/winpos.c | 2 +-
3 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index b2f3f48a504..f128d15419d 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -859,12 +859,10 @@ static void test_thread_exit_destroy(void)
SetLastError( 0xdeadbeef );
tmp = SetParent( child1, adopter );
ok( tmp == 0, "SetParent returned %p\n", tmp );
- todo_wine
ok( GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError() );
SetLastError( 0xdeadbeef );
tmp = SetParent( child3, adopter );
ok( tmp == 0, "SetParent returned %p\n", tmp );
- todo_wine
ok( GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError() );
SetLastError( 0xdeadbeef );
tmp = GetParent( child1 );
@@ -903,12 +901,10 @@ static void test_thread_exit_destroy(void)
SetLastError( 0xdeadbeef );
ret = SetWindowPos( child2, HWND_TOPMOST, 0, 0, 100, 100, SWP_NOSIZE|SWP_NOMOVE );
ok( !ret, "SetWindowPos succeeded\n" );
- todo_wine
ok( GetLastError() == ERROR_INVALID_PARAMETER, "SetWindowPos returned error %u\n", GetLastError() );
SetLastError( 0xdeadbeef );
ret = SetWindowPos( child2, 0, 10, 10, 200, 200, SWP_NOZORDER | SWP_NOACTIVATE );
ok( !ret, "SetWindowPos succeeded\n" );
- todo_wine
ok( GetLastError() == ERROR_INVALID_PARAMETER, "SetWindowPos returned error %u\n", GetLastError() );
rgn = CreateRectRgn( 5, 5, 15, 15 );
diff --git a/dlls/user32/win.c b/dlls/user32/win.c
index 5e89f4c2c97..815c668d675 100644
--- a/dlls/user32/win.c
+++ b/dlls/user32/win.c
@@ -3357,7 +3357,7 @@ HWND WINAPI SetParent( HWND hwnd, HWND parent )
{
req->handle = wine_server_user_handle( hwnd );
req->parent = wine_server_user_handle( parent );
- if ((ret = !wine_server_call( req )))
+ if ((ret = !wine_server_call_err( req )))
{
old_parent = wine_server_ptr_handle( reply->old_parent );
wndPtr->parent = parent = wine_server_ptr_handle( reply->full_parent );
diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c
index fa2f7e6fede..7253231b84a 100644
--- a/dlls/user32/winpos.c
+++ b/dlls/user32/winpos.c
@@ -2245,7 +2245,7 @@ BOOL set_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags,
if (new_surface) req->paint_flags |= SET_WINPOS_PAINT_SURFACE;
if (win->pixel_format) req->paint_flags |= SET_WINPOS_PIXEL_FORMAT;
- if ((ret = !wine_server_call( req )))
+ if ((ret = !wine_server_call_err( req )))
{
win->dwStyle = reply->new_style;
win->dwExStyle = reply->new_ex_style;
--
2.33.0
More information about the wine-devel
mailing list