Jacek Caban : win32u: Move GetClientRect implementation from user32.
Alexandre Julliard
julliard at winehq.org
Wed Mar 9 16:08:45 CST 2022
Module: wine
Branch: master
Commit: fd5849382a1ddfa9798ca418397e3fcf5a094ef1
URL: https://source.winehq.org/git/wine.git/?a=commit;h=fd5849382a1ddfa9798ca418397e3fcf5a094ef1
Author: Jacek Caban <jacek at codeweavers.com>
Date: Wed Mar 9 15:22:49 2022 +0100
win32u: Move GetClientRect implementation from user32.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user32/winpos.c | 2 +-
dlls/win32u/window.c | 8 ++++++++
include/ntuser.h | 1 +
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c
index ba46440bc36..1387552ca55 100644
--- a/dlls/user32/winpos.c
+++ b/dlls/user32/winpos.c
@@ -225,7 +225,7 @@ int WINAPI SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL bRedraw )
*/
BOOL WINAPI GetClientRect( HWND hwnd, LPRECT rect )
{
- return WIN_GetRectangles( hwnd, COORDS_CLIENT, NULL, rect );
+ return NtUserCallHwndParam( hwnd, (UINT_PTR)rect, NtUserGetClientRect );
}
diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c
index 19b2b4335f8..abfc19de40a 100644
--- a/dlls/win32u/window.c
+++ b/dlls/win32u/window.c
@@ -1139,6 +1139,12 @@ BOOL get_window_rect( HWND hwnd, RECT *rect )
return get_window_rects( hwnd, COORDS_SCREEN, rect, NULL, get_thread_dpi() );
}
+/* see GetClientRect */
+static BOOL get_client_rect( HWND hwnd, RECT *rect )
+{
+ return get_window_rects( hwnd, COORDS_CLIENT, NULL, rect, get_thread_dpi() );
+}
+
/* see GetWindowInfo */
static BOOL get_window_info( HWND hwnd, WINDOWINFO *info )
{
@@ -1357,6 +1363,8 @@ ULONG_PTR WINAPI NtUserCallHwndParam( HWND hwnd, DWORD_PTR param, DWORD code )
return get_class_long_ptr( hwnd, param, FALSE );
case NtUserGetClassWord:
return get_class_word( hwnd, param );
+ case NtUserGetClientRect:
+ return get_client_rect( hwnd, (RECT *)param );
case NtUserGetWindowInfo:
return get_window_info( hwnd, (WINDOWINFO *)param );
case NtUserGetWindowLongA:
diff --git a/include/ntuser.h b/include/ntuser.h
index 5192bd63a90..547471daf69 100644
--- a/include/ntuser.h
+++ b/include/ntuser.h
@@ -160,6 +160,7 @@ enum
NtUserGetClassLongPtrA,
NtUserGetClassLongPtrW,
NtUserGetClassWord,
+ NtUserGetClientRect,
NtUserGetWindowInfo,
NtUserGetWindowLongA,
NtUserGetWindowLongW,
More information about the wine-cvs
mailing list