Commit a4245969 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Move NtUserGetQueueStatus implementation from user32.

parent a8b0b07c
......@@ -446,32 +446,6 @@ SHORT WINAPI DECLSPEC_HOTPATCH GetAsyncKeyState( INT key )
/***********************************************************************
* GetQueueStatus (USER32.@)
*/
DWORD WINAPI GetQueueStatus( UINT flags )
{
DWORD ret;
if (flags & ~(QS_ALLINPUT | QS_ALLPOSTMESSAGE | QS_SMRESULT))
{
SetLastError( ERROR_INVALID_FLAGS );
return 0;
}
check_for_events( flags );
SERVER_START_REQ( get_queue_status )
{
req->clear_bits = flags;
wine_server_call( req );
ret = MAKELONG( reply->changed_bits & flags, reply->wake_bits & flags );
}
SERVER_END_REQ;
return ret;
}
/***********************************************************************
* GetInputState (USER32.@)
*/
BOOL WINAPI GetInputState(void)
......
......@@ -365,7 +365,7 @@
@ stdcall GetProgmanWindow ()
@ stdcall GetPropA(long str)
@ stdcall GetPropW(long wstr)
@ stdcall GetQueueStatus(long)
@ stdcall GetQueueStatus(long) NtUserGetQueueStatus
@ stdcall GetRawInputBuffer(ptr ptr long)
@ stdcall GetRawInputData(ptr long ptr ptr long)
@ stdcall GetRawInputDeviceInfoA(ptr long ptr ptr)
......
......@@ -1064,6 +1064,7 @@ static const struct user_driver_funcs lazy_load_driver =
.pEnumDisplaySettingsEx = loaderdrv_EnumDisplaySettingsEx,
.pUpdateDisplayDevices = loaderdrv_UpdateDisplayDevices,
/* windowing functions */
.pMsgWaitForMultipleObjectsEx = nulldrv_MsgWaitForMultipleObjectsEx,
.pScrollDC = nulldrv_ScrollDC,
/* system parameters */
.pSystemParametersInfo = nulldrv_SystemParametersInfo,
......
......@@ -1162,6 +1162,7 @@ static struct unix_funcs unix_funcs =
NtUserGetKeyNameText,
NtUserGetKeyboardLayoutList,
NtUserGetPriorityClipboardFormat,
NtUserGetQueueStatus,
NtUserGetUpdatedClipboardFormats,
NtUserIsClipboardFormatAvailable,
NtUserMapVirtualKeyEx,
......
......@@ -128,6 +128,37 @@ BOOL get_cursor_pos( POINT *pt )
return ret;
}
static void check_for_events( UINT flags )
{
if (user_driver->pMsgWaitForMultipleObjectsEx( 0, NULL, 0, flags, 0 ) == WAIT_TIMEOUT)
flush_window_surfaces( TRUE );
}
/***********************************************************************
* NtUserGetQueueStatus (win32u.@)
*/
DWORD WINAPI NtUserGetQueueStatus( UINT flags )
{
DWORD ret;
if (flags & ~(QS_ALLINPUT | QS_ALLPOSTMESSAGE | QS_SMRESULT))
{
SetLastError( ERROR_INVALID_FLAGS );
return 0;
}
check_for_events( flags );
SERVER_START_REQ( get_queue_status )
{
req->clear_bits = flags;
wine_server_call( req );
ret = MAKELONG( reply->changed_bits & flags, reply->wake_bits & flags );
}
SERVER_END_REQ;
return ret;
}
/***********************************************************************
* get_locale_kbd_layout
*/
......
......@@ -981,7 +981,7 @@
@ stub NtUserGetProcessUIContextInformation
@ stdcall -syscall NtUserGetProcessWindowStation()
@ stdcall -syscall NtUserGetProp(long wstr)
@ stub NtUserGetQueueStatus
@ stdcall NtUserGetQueueStatus(long)
@ stub NtUserGetQueueStatusReadonly
@ stub NtUserGetRawInputBuffer
@ stub NtUserGetRawInputData
......
......@@ -208,6 +208,7 @@ struct unix_funcs
INT (WINAPI *pNtUserGetKeyNameText)( LONG lparam, WCHAR *buffer, INT size );
UINT (WINAPI *pNtUserGetKeyboardLayoutList)( INT size, HKL *layouts );
INT (WINAPI *pNtUserGetPriorityClipboardFormat)( UINT *list, INT count );
DWORD (WINAPI *pNtUserGetQueueStatus)( UINT flags );
BOOL (WINAPI *pNtUserGetUpdatedClipboardFormats)( UINT *formats, UINT size, UINT *out_size );
BOOL (WINAPI *pNtUserIsClipboardFormatAvailable)( UINT format );
UINT (WINAPI *pNtUserMapVirtualKeyEx)( UINT code, UINT type, HKL layout );
......
......@@ -777,6 +777,12 @@ INT WINAPI NtUserGetPriorityClipboardFormat( UINT *list, INT count )
return unix_funcs->pNtUserGetPriorityClipboardFormat( list, count );
}
DWORD WINAPI NtUserGetQueueStatus( UINT flags )
{
if (!unix_funcs) return 0;
return unix_funcs->pNtUserGetQueueStatus( flags );
}
BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *out_size )
{
if (!unix_funcs) return FALSE;
......
......@@ -176,6 +176,7 @@ INT WINAPI NtUserGetPriorityClipboardFormat( UINT *list, INT count );
HWINSTA WINAPI NtUserGetProcessWindowStation(void);
HANDLE WINAPI NtUserGetProp( HWND hwnd, const WCHAR *str );
ULONG WINAPI NtUserGetProcessDpiAwarenessContext( HANDLE process );
DWORD WINAPI NtUserGetQueueStatus( UINT flags );
ULONG WINAPI NtUserGetSystemDpiForProcess( HANDLE process );
HDESK WINAPI NtUserGetThreadDesktop( DWORD thread );
BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *out_size );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment