From: Zhiyi Zhang zzhang@codeweavers.com
--- dlls/user32/tests/msg.c | 6 ------ dlls/win32u/defwnd.c | 1 + 2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index d99059c23f8..9b4c1e88148 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -21167,7 +21167,6 @@ static void test_defwinproc_wm_print(void)
/* Check the return code when no flags are specified */ lr = DefWindowProcA(hwnd, WM_PRINT, (WPARAM)hdc, 0); - todo_wine ok(lr == 1, "Got unexpected lr %Id.\n", lr);
/* Check the return code when PRF_CHECKVISIBLE is specified and the window is invisible */ @@ -21180,22 +21179,18 @@ static void test_defwinproc_wm_print(void)
/* Check the return code when PRF_CHECKVISIBLE is specified and the window is visible */ lr = DefWindowProcA(hwnd, WM_PRINT, (WPARAM)hdc, PRF_CHECKVISIBLE); - todo_wine ok(lr == 1, "Got unexpected lr %Id.\n", lr);
/* Check the return code when PRF_ERASEBKGND is specified */ lr = DefWindowProcA(hwnd, WM_PRINT, (WPARAM)hdc, PRF_ERASEBKGND); - todo_wine ok(lr == 1, "Got unexpected lr %Id.\n", lr);
/* Check the return code when PRF_CLIENT is specified */ lr = DefWindowProcA(hwnd, WM_PRINT, (WPARAM)hdc, PRF_CLIENT); - todo_wine ok(lr == 1, "Got unexpected lr %Id.\n", lr);
/* PRF_CHILDREN needs to be used with PRF_CLIENT */ lr = DefWindowProcA(hwnd, WM_PRINT, (WPARAM)hdc, PRF_CHILDREN); - todo_wine ok(lr == 1, "Got unexpected lr %Id.\n", lr); color = GetPixel(hdc, 50, 50); ok(color == RGB(0xff, 0xff, 0xff), "Got unexpected color %#lx.\n", color); @@ -21204,7 +21199,6 @@ static void test_defwinproc_wm_print(void)
/* PRF_CHILDREN | PRF_CLIENT */ lr = DefWindowProcA(hwnd, WM_PRINT, (WPARAM)hdc, PRF_CHILDREN | PRF_CLIENT); - todo_wine ok(lr == 1, "Got unexpected lr %Id.\n", lr); color = GetPixel(hdc, 50, 50); todo_wine diff --git a/dlls/win32u/defwnd.c b/dlls/win32u/defwnd.c index 4246b5d7653..27bc76e1886 100644 --- a/dlls/win32u/defwnd.c +++ b/dlls/win32u/defwnd.c @@ -2829,6 +2829,7 @@ LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
case WM_PRINT: if ((lparam & PRF_CHECKVISIBLE) && !is_window_visible ( hwnd )) break; + result = 1;
if (lparam & (PRF_CHILDREN | PRF_OWNED | PRF_NONCLIENT)) WARN( "WM_PRINT message with unsupported lparam %lx\n", lparam );