 
            From: Paul Gofman pgofman@codeweavers.com
--- dlls/user32/user32.spec | 2 +- dlls/user32/win.c | 17 ----------------- dlls/win32u/main.c | 5 +++++ dlls/win32u/win32u.spec | 2 +- dlls/win32u/window.c | 17 +++++++++++++++++ dlls/wow64win/user.c | 8 ++++++++ include/ntuser.h | 1 + 7 files changed, 33 insertions(+), 19 deletions(-)
diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index a4680054438..0645792a312 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -701,7 +701,7 @@ # @ stub GetWindowCompositionInfo @ stdcall GetWindowContextHelpId(long) NtUserGetWindowContextHelpId @ stdcall GetWindowDC(long) NtUserGetWindowDC -@ stdcall GetWindowDisplayAffinity(long ptr) +@ stdcall GetWindowDisplayAffinity(long ptr) NtUserGetWindowDisplayAffinity @ stdcall GetWindowDpiAwarenessContext(long) @ stdcall GetWindowDpiHostingBehavior(long) # @ stub GetWindowFeedbackSetting diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 870c403d36b..c60ec8d804b 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -1604,23 +1604,6 @@ LONG_PTR WINAPI SetWindowLongPtrA( HWND hwnd, INT offset, LONG_PTR newval )
#endif /* _WIN64 */
-/***************************************************************************** - * GetWindowDisplayAffinity (USER32.@) - */ -BOOL WINAPI GetWindowDisplayAffinity(HWND hwnd, DWORD *affinity) -{ - FIXME("(%p, %p): stub\n", hwnd, affinity); - - if (!hwnd || !affinity) - { - SetLastError(hwnd ? ERROR_NOACCESS : ERROR_INVALID_WINDOW_HANDLE); - return FALSE; - } - - *affinity = WDA_NONE; - return TRUE; -} - /***************************************************************************** * SetWindowDisplayAffinity (USER32.@) */ diff --git a/dlls/win32u/main.c b/dlls/win32u/main.c index d3192738ddd..7b839e37cc2 100644 --- a/dlls/win32u/main.c +++ b/dlls/win32u/main.c @@ -1824,6 +1824,11 @@ HDC SYSCALL_API NtUserGetWindowDC( HWND hwnd ) SYSCALL_FUNC( NtUserGetWindowDC ); }
+BOOL SYSCALL_API NtUserGetWindowDisplayAffinity( HWND hwnd, DWORD *affinity ) +{ + SYSCALL_FUNC( NtUserGetWindowDisplayAffinity ); +} + BOOL SYSCALL_API NtUserGetWindowPlacement( HWND hwnd, WINDOWPLACEMENT *placement ) { SYSCALL_FUNC( NtUserGetWindowPlacement ); diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index 84654596515..54f00203120 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -1118,7 +1118,7 @@ @ stub -syscall NtUserGetWindowCompositionInfo @ stdcall -syscall NtUserGetWindowContextHelpId(long) @ stdcall -syscall NtUserGetWindowDC(long) -@ stub -syscall NtUserGetWindowDisplayAffinity +@ stdcall -syscall NtUserGetWindowDisplayAffinity(ptr ptr) @ stub -syscall NtUserGetWindowFeedbackSetting @ stub -syscall NtUserGetWindowGroupId @ stub -syscall NtUserGetWindowMinimizeRect diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 96a810845af..e818bfe2660 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -6378,3 +6378,20 @@ BOOL WINAPI NtUserIsChildWindowDpiMessageEnabled( HWND hwnd ) FIXME( "%p: stub\n", hwnd ); return FALSE; } + +/***************************************************************** + * NtUserGetWindowDisplayAffinity (win32u.@) + */ +BOOL WINAPI NtUserGetWindowDisplayAffinity( HWND hwnd, DWORD *affinity ) +{ + FIXME( "%p, %p: stub\n", hwnd, affinity ); + + if (!hwnd || !affinity) + { + RtlSetLastWin32Error( hwnd ? ERROR_NOACCESS : ERROR_INVALID_WINDOW_HANDLE ); + return FALSE; + } + + *affinity = WDA_NONE; + return TRUE; +} diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index ae15083bf0e..66df9d04d54 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -3042,6 +3042,14 @@ NTSTATUS WINAPI wow64_NtUserGetRawInputDeviceList( UINT *args ) } }
+NTSTATUS WINAPI wow64_NtUserGetWindowDisplayAffinity( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + DWORD *affinity = get_ptr( &args ); + + return NtUserGetWindowDisplayAffinity( hwnd, affinity ); +} + NTSTATUS WINAPI wow64_NtUserRealChildWindowFromPoint( UINT *args ) { HWND parent = get_handle( &args ); diff --git a/include/ntuser.h b/include/ntuser.h index 4a451cc155c..556b8bbbf51 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -899,6 +899,7 @@ W32KAPI BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT siz W32KAPI BOOL WINAPI NtUserGetUpdateRect( HWND hwnd, RECT *rect, BOOL erase ); W32KAPI DWORD WINAPI NtUserGetWindowContextHelpId( HWND hwnd ); W32KAPI HDC WINAPI NtUserGetWindowDC( HWND hwnd ); +W32KAPI BOOL WINAPI NtUserGetWindowDisplayAffinity( HWND hwnd, DWORD *affinity ); W32KAPI BOOL WINAPI NtUserGetWindowPlacement( HWND hwnd, WINDOWPLACEMENT *placement ); W32KAPI int WINAPI NtUserGetWindowRgnEx( HWND hwnd, HRGN hrgn, UINT unk ); W32KAPI BOOL WINAPI NtUserHideCaret( HWND hwnd );

