diff --git a/dlls/user32/clipboard.c b/dlls/user32/clipboard.c index 62a17f5d021..ffeb03d4435 100644 --- a/dlls/user32/clipboard.c +++ b/dlls/user32/clipboard.c @@ -750,25 +750,6 @@ BOOL WINAPI EmptyClipboard(void) } -/************************************************************************** - * GetOpenClipboardWindow (USER32.@) - */ -HWND WINAPI GetOpenClipboardWindow(void) -{ - HWND hWndOpen = 0; - - SERVER_START_REQ( get_clipboard_info ) - { - if (!wine_server_call_err( req )) hWndOpen = wine_server_ptr_handle( reply->window ); - } - SERVER_END_REQ; - - TRACE( "returning %p\n", hWndOpen ); - - return hWndOpen; -} - - /************************************************************************** * SetClipboardViewer (USER32.@) */ diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index 99e1157227c..ffab0fca4d4 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -353,7 +353,7 @@ @ stdcall GetNextDlgGroupItem(long long long) @ stdcall GetNextDlgTabItem(long long long) # @ stub GetNextQueueWindow -@ stdcall GetOpenClipboardWindow() +@ stdcall GetOpenClipboardWindow() NtUserGetOpenClipboardWindow @ stdcall GetParent(long) @ stdcall GetPhysicalCursorPos(ptr) @ stdcall GetPointerDevices(ptr ptr) diff --git a/dlls/win32u/clipboard.c b/dlls/win32u/clipboard.c index 7acab5de631..dca01708803 100644 --- a/dlls/win32u/clipboard.c +++ b/dlls/win32u/clipboard.c @@ -222,6 +222,23 @@ HWND WINAPI NtUserGetClipboardViewer(void) return viewer; } +/************************************************************************** + * NtUserGetOpenClipboardWindow (win32u.@) + */ +HWND WINAPI NtUserGetOpenClipboardWindow(void) +{ + HWND window = 0; + + SERVER_START_REQ( get_clipboard_info ) + { + if (!wine_server_call_err( req )) window = wine_server_ptr_handle( reply->window ); + } + SERVER_END_REQ; + + TRACE( "returning %p\n", window ); + return window; +} + /************************************************************************** * NtUserGetClipboardSequenceNumber (win32u.@) */ diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index b6419c08ea0..26471718e51 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -116,6 +116,7 @@ static void * const syscalls[] = NtUserGetKeyboardState, NtUserGetLayeredWindowAttributes, NtUserGetObjectInformation, + NtUserGetOpenClipboardWindow, NtUserGetProcessWindowStation, NtUserGetProp, NtUserGetThreadDesktop, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index 1353924845c..2f4b36babe5 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -959,7 +959,7 @@ @ stub NtUserGetMouseMovePointsEx @ stdcall -syscall NtUserGetObjectInformation(long long long long ptr) @ stub NtUserGetOemBitmapSize -@ stub NtUserGetOpenClipboardWindow +@ stdcall -syscall NtUserGetOpenClipboardWindow() @ stub NtUserGetOwnerTransformedMonitorRect @ stub NtUserGetPhysicalDeviceRect @ stub NtUserGetPointerCursorId diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index 09a281b5d14..d97563427ce 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -102,6 +102,7 @@ SYSCALL_ENTRY( NtUserGetKeyboardState ) \ SYSCALL_ENTRY( NtUserGetLayeredWindowAttributes ) \ SYSCALL_ENTRY( NtUserGetObjectInformation ) \ + SYSCALL_ENTRY( NtUserGetOpenClipboardWindow ) \ SYSCALL_ENTRY( NtUserGetProcessWindowStation ) \ SYSCALL_ENTRY( NtUserGetProp ) \ SYSCALL_ENTRY( NtUserGetThreadDesktop ) \ diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 4c47b8937cf..39f54ae82ba 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -205,6 +205,11 @@ NTSTATUS WINAPI wow64_NtUserGetClipboardOwner( UINT *args ) return HandleToUlong( NtUserGetClipboardOwner() ); } +NTSTATUS WINAPI wow64_NtUserGetOpenClipboardWindow( UINT *args ) +{ + return HandleToUlong( NtUserGetOpenClipboardWindow() ); +} + NTSTATUS WINAPI wow64_NtUserGetClipboardSequenceNumber( UINT *args ) { return NtUserGetClipboardSequenceNumber(); diff --git a/include/ntuser.h b/include/ntuser.h index d06a0aee429..536e78dfda5 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -74,6 +74,7 @@ BOOL WINAPI NtUserGetKeyboardState( BYTE *state ); BOOL WINAPI NtUserGetLayeredWindowAttributes( HWND hwnd, COLORREF *key, BYTE *alpha, DWORD *flags ); BOOL WINAPI NtUserGetObjectInformation( HANDLE handle, INT index, void *info, DWORD len, DWORD *needed ); +HWND WINAPI NtUserGetOpenClipboardWindow(void); INT WINAPI NtUserGetPriorityClipboardFormat( UINT *list, INT count ); HWINSTA WINAPI NtUserGetProcessWindowStation(void); HANDLE WINAPI NtUserGetProp( HWND hwnd, const WCHAR *str );