[PATCH 5/7] win32u: Move WM_PRINT implementation from user32.
Jacek Caban
wine at gitlab.winehq.org
Mon Jun 20 08:21:43 CDT 2022
From: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
---
dlls/user32/defwnd.c | 43 -------------------------------------------
dlls/win32u/defwnd.c | 10 ++++++++++
2 files changed, 10 insertions(+), 43 deletions(-)
diff --git a/dlls/user32/defwnd.c b/dlls/user32/defwnd.c
index be41f6c47a0..dcc0f4d2138 100644
--- a/dlls/user32/defwnd.c
+++ b/dlls/user32/defwnd.c
@@ -75,45 +75,6 @@ HBRUSH DEFWND_ControlColor( HDC hDC, UINT ctlType )
}
-/***********************************************************************
- * DEFWND_Print
- *
- * This method handles the default behavior for the WM_PRINT message.
- */
-static void DEFWND_Print( HWND hwnd, HDC hdc, ULONG uFlags)
-{
- /*
- * Visibility flag.
- */
- if ( (uFlags & PRF_CHECKVISIBLE) &&
- !IsWindowVisible(hwnd) )
- return;
-
- /*
- * Unimplemented flags.
- */
- if ( (uFlags & PRF_CHILDREN) ||
- (uFlags & PRF_OWNED) ||
- (uFlags & PRF_NONCLIENT) )
- {
- WARN("WM_PRINT message with unsupported flags\n");
- }
-
- /*
- * Background
- */
- if ( uFlags & PRF_ERASEBKGND)
- SendMessageW(hwnd, WM_ERASEBKGND, (WPARAM)hdc, 0);
-
- /*
- * Client area
- */
- if ( uFlags & PRF_CLIENT)
- SendMessageW(hwnd, WM_PRINTCLIENT, (WPARAM)hdc, uFlags);
-}
-
-
-
/***********************************************************************
* DEFWND_DefWinProc
*
@@ -157,10 +118,6 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
}
break;
- case WM_PRINT:
- DEFWND_Print(hwnd, (HDC)wParam, lParam);
- return 0;
-
case WM_SYSCOMMAND:
return NC_HandleSysCommand( hwnd, wParam, lParam );
diff --git a/dlls/win32u/defwnd.c b/dlls/win32u/defwnd.c
index 506ff0f9fd9..0470ed77eac 100644
--- a/dlls/win32u/defwnd.c
+++ b/dlls/win32u/defwnd.c
@@ -2621,6 +2621,16 @@ LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
break;
}
+ case WM_PRINT:
+ if ((lparam & PRF_CHECKVISIBLE) && !is_window_visible ( hwnd )) break;
+
+ if (lparam & (PRF_CHILDREN | PRF_OWNED | PRF_NONCLIENT))
+ WARN( "WM_PRINT message with unsupported lparam %lx\n", lparam );
+
+ if (lparam & PRF_ERASEBKGND) send_message( hwnd, WM_ERASEBKGND, wparam, 0 );
+ if (lparam & PRF_CLIENT) send_message(hwnd, WM_PRINTCLIENT, wparam, lparam );
+ break;
+
case WM_APPCOMMAND:
{
HWND parent = get_parent( hwnd );
--
GitLab
https://gitlab.winehq.org/wine/wine/-/merge_requests/285
More information about the wine-devel
mailing list