win32u: Move NtUserGetCursor 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-12-03 12:55:44 +01:00 committed by Alexandre Julliard
parent c87925bae3
commit a25148ae46
8 changed files with 29 additions and 20 deletions

View File

@ -1873,7 +1873,7 @@ BOOL WINAPI DestroyIcon( HICON hIcon )
{
BOOL shared = (obj->rsrc != NULL);
release_user_handle_ptr( obj );
ret = (GetCursor() != hIcon);
ret = (NtUserGetCursor() != hIcon);
if (!shared) free_icon_handle( hIcon );
}
return ret;
@ -1933,23 +1933,6 @@ HCURSOR WINAPI DECLSPEC_HOTPATCH SetCursor( HCURSOR hCursor /* [in] Handle of cu
return hOldCursor;
}
/***********************************************************************
* GetCursor (USER32.@)
*/
HCURSOR WINAPI GetCursor(void)
{
HCURSOR ret;
SERVER_START_REQ( set_cursor )
{
req->flags = 0;
wine_server_call( req );
ret = wine_server_ptr_handle( reply->prev_handle );
}
SERVER_END_REQ;
return ret;
}
/***********************************************************************
* ClipCursor (USER32.@)

View File

@ -282,7 +282,7 @@
@ stdcall GetClipboardViewer() NtUserGetClipboardViewer
@ stdcall GetComboBoxInfo(long ptr)
@ stdcall GetCurrentInputMessageSource(ptr)
@ stdcall GetCursor()
@ stdcall GetCursor() NtUserGetCursor
@ stdcall GetCursorFrameInfo(long long long ptr ptr)
@ stdcall GetCursorInfo(ptr)
@ stdcall GetCursorPos(ptr)

View File

@ -61,3 +61,21 @@ INT WINAPI NtUserShowCursor( BOOL show )
return count;
}
/***********************************************************************
* NtUserGetCursor (win32u.@)
*/
HCURSOR WINAPI NtUserGetCursor(void)
{
HCURSOR ret;
SERVER_START_REQ( set_cursor )
{
req->flags = 0;
wine_server_call( req );
ret = wine_server_ptr_handle( reply->prev_handle );
}
SERVER_END_REQ;
return ret;
}

View File

@ -111,6 +111,7 @@ static void * const syscalls[] =
NtUserGetClipboardOwner,
NtUserGetClipboardSequenceNumber,
NtUserGetClipboardViewer,
NtUserGetCursor,
NtUserGetKeyState,
NtUserGetKeyboardLayout,
NtUserGetKeyboardState,

View File

@ -912,7 +912,7 @@
@ stub NtUserGetControlColor
@ stub NtUserGetCurrentDpiInfoForWindow
@ stub NtUserGetCurrentInputMessageSource
@ stub NtUserGetCursor
@ stdcall -syscall NtUserGetCursor()
@ stub NtUserGetCursorFrameInfo
@ stub NtUserGetCursorInfo
@ stub NtUserGetDC

View File

@ -98,6 +98,7 @@
SYSCALL_ENTRY( NtUserGetClipboardOwner ) \
SYSCALL_ENTRY( NtUserGetClipboardSequenceNumber ) \
SYSCALL_ENTRY( NtUserGetClipboardViewer ) \
SYSCALL_ENTRY( NtUserGetCursor ) \
SYSCALL_ENTRY( NtUserGetKeyState ) \
SYSCALL_ENTRY( NtUserGetKeyboardLayout ) \
SYSCALL_ENTRY( NtUserGetKeyboardState ) \

View File

@ -234,6 +234,11 @@ NTSTATUS WINAPI wow64_NtUserRemoveClipboardFormatListener( UINT *args )
return NtUserRemoveClipboardFormatListener( hwnd );
}
NTSTATUS WINAPI wow64_NtUserGetCursor( UINT *args )
{
return HandleToUlong( NtUserGetCursor() );
}
NTSTATUS WINAPI wow64_NtUserAttachThreadInput( UINT *args )
{
DWORD from = get_ulong( &args );

View File

@ -98,6 +98,7 @@ INT WINAPI NtUserGetClipboardFormatName( UINT format, WCHAR *buffer, INT max
HWND WINAPI NtUserGetClipboardOwner(void);
DWORD WINAPI NtUserGetClipboardSequenceNumber(void);
HWND WINAPI NtUserGetClipboardViewer(void);
HCURSOR WINAPI NtUserGetCursor(void);
LONG WINAPI NtUserGetDisplayConfigBufferSizes( UINT32 flags, UINT32 *num_path_info,
UINT32 *num_mode_info );
INT WINAPI NtUserGetKeyNameText( LONG lparam, WCHAR *buffer, INT size );