win32u: Move NtUserGetClipboardOwner implementation from user32.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2021-11-12 12:53:50 +01:00 committed by Alexandre Julliard
parent a4e800f380
commit e8dac807aa
9 changed files with 29 additions and 23 deletions

View File

@ -729,7 +729,7 @@ BOOL WINAPI CloseClipboard(void)
BOOL WINAPI EmptyClipboard(void)
{
BOOL ret;
HWND owner = GetClipboardOwner();
HWND owner = NtUserGetClipboardOwner();
TRACE( "owner %p\n", owner );
@ -750,25 +750,6 @@ BOOL WINAPI EmptyClipboard(void)
}
/**************************************************************************
* GetClipboardOwner (USER32.@)
*/
HWND WINAPI GetClipboardOwner(void)
{
HWND hWndOwner = 0;
SERVER_START_REQ( get_clipboard_info )
{
if (!wine_server_call_err( req )) hWndOwner = wine_server_ptr_handle( reply->owner );
}
SERVER_END_REQ;
TRACE( "returning %p\n", hWndOwner );
return hWndOwner;
}
/**************************************************************************
* GetOpenClipboardWindow (USER32.@)
*/

View File

@ -277,7 +277,7 @@
@ stdcall GetClipboardData(long)
@ stdcall GetClipboardFormatNameA(long ptr long)
@ stdcall GetClipboardFormatNameW(long ptr long) NtUserGetClipboardFormatName
@ stdcall GetClipboardOwner()
@ stdcall GetClipboardOwner() NtUserGetClipboardOwner
@ stdcall GetClipboardSequenceNumber ()
@ stdcall GetClipboardViewer()
@ stdcall GetComboBoxInfo(long ptr)

View File

@ -1949,7 +1949,7 @@ static void WIN_SendDestroyMsg( HWND hwnd )
if (hwnd == info.hwndActive) WINPOS_ActivateOtherWindow( hwnd );
}
if (hwnd == GetClipboardOwner()) CLIPBOARD_ReleaseOwner( hwnd );
if (hwnd == NtUserGetClipboardOwner()) CLIPBOARD_ReleaseOwner( hwnd );
/*
* Send the WM_DESTROY to the window.

View File

@ -140,3 +140,20 @@ INT WINAPI NtUserGetClipboardFormatName( UINT format, WCHAR *buffer, INT maxlen
buffer[length] = 0;
return length;
}
/**************************************************************************
* NtUserGetClipboardOwner (win32u.@)
*/
HWND WINAPI NtUserGetClipboardOwner(void)
{
HWND owner = 0;
SERVER_START_REQ( get_clipboard_info )
{
if (!wine_server_call_err( req )) owner = wine_server_ptr_handle( reply->owner );
}
SERVER_END_REQ;
TRACE( "returning %p\n", owner );
return owner;
}

View File

@ -106,6 +106,7 @@ static void * const syscalls[] =
NtUserCreateDesktopEx,
NtUserCreateWindowStation,
NtUserGetClipboardFormatName,
NtUserGetClipboardOwner,
NtUserGetLayeredWindowAttributes,
NtUserGetObjectInformation,
NtUserGetProcessWindowStation,

View File

@ -904,7 +904,7 @@
@ stub NtUserGetClipboardAccessToken
@ stub NtUserGetClipboardData
@ stdcall -syscall NtUserGetClipboardFormatName(long ptr long)
@ stub NtUserGetClipboardOwner
@ stdcall -syscall NtUserGetClipboardOwner()
@ stub NtUserGetClipboardSequenceNumber
@ stub NtUserGetClipboardViewer
@ stub NtUserGetComboBoxInfo

View File

@ -93,6 +93,7 @@
SYSCALL_ENTRY( NtUserCreateDesktopEx ) \
SYSCALL_ENTRY( NtUserCreateWindowStation ) \
SYSCALL_ENTRY( NtUserGetClipboardFormatName ) \
SYSCALL_ENTRY( NtUserGetClipboardOwner ) \
SYSCALL_ENTRY( NtUserGetLayeredWindowAttributes ) \
SYSCALL_ENTRY( NtUserGetObjectInformation ) \
SYSCALL_ENTRY( NtUserGetProcessWindowStation ) \

View File

@ -199,3 +199,8 @@ NTSTATUS WINAPI wow64_NtUserGetClipboardFormatName( UINT *args )
return NtUserGetClipboardFormatName( format, buffer, maxlen );
}
NTSTATUS WINAPI wow64_NtUserGetClipboardOwner( UINT *args )
{
return HandleToUlong( NtUserGetClipboardOwner() );
}

View File

@ -32,6 +32,7 @@ HDESK WINAPI NtUserCreateDesktopEx( OBJECT_ATTRIBUTES *attr, UNICODE_STRING *d
HWINSTA WINAPI NtUserCreateWindowStation( OBJECT_ATTRIBUTES *attr, ACCESS_MASK mask, ULONG arg3,
ULONG arg4, ULONG arg5, ULONG arg6, ULONG arg7 );
INT WINAPI NtUserGetClipboardFormatName( UINT format, WCHAR *buffer, INT maxlen );
HWND WINAPI NtUserGetClipboardOwner(void);
BOOL WINAPI NtUserGetLayeredWindowAttributes( HWND hwnd, COLORREF *key, BYTE *alpha, DWORD *flags );
BOOL WINAPI NtUserGetObjectInformation( HANDLE handle, INT index, void *info,
DWORD len, DWORD *needed );