-- v2: win32u: Implement NtUserGetCurrentInputMessageSource().
From: Paul Gofman pgofman@codeweavers.com
--- dlls/user32/message.c | 10 ---------- dlls/user32/user32.spec | 2 +- dlls/win32u/main.c | 5 +++++ dlls/win32u/message.c | 16 ++++++++++++++++ dlls/win32u/win32u.spec | 2 +- dlls/wow64win/user.c | 7 +++++++ include/ntuser.h | 1 + 7 files changed, 31 insertions(+), 12 deletions(-)
diff --git a/dlls/user32/message.c b/dlls/user32/message.c index 493fb7bec30..1d63e6c13bc 100644 --- a/dlls/user32/message.c +++ b/dlls/user32/message.c @@ -973,16 +973,6 @@ LPARAM WINAPI SetMessageExtraInfo(LPARAM lParam) }
-/*********************************************************************** - * GetCurrentInputMessageSource (USER32.@) - */ -BOOL WINAPI GetCurrentInputMessageSource( INPUT_MESSAGE_SOURCE *source ) -{ - *source = NtUserGetThreadInfo()->msg_source; - return TRUE; -} - - /*********************************************************************** * MsgWaitForMultipleObjects (USER32.@) */ diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index 9ef28e0cb3f..52c9aea4721 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -537,7 +537,7 @@ @ stdcall GetClipboardSequenceNumber() NtUserGetClipboardSequenceNumber @ stdcall GetClipboardViewer() NtUserGetClipboardViewer @ stdcall GetComboBoxInfo(long ptr) -@ stdcall GetCurrentInputMessageSource(ptr) +@ stdcall GetCurrentInputMessageSource(ptr) NtUserGetCurrentInputMessageSource @ stdcall GetCursor() NtUserGetCursor @ stdcall GetCursorFrameInfo(long long long ptr ptr) @ stdcall GetCursorInfo(ptr) NtUserGetCursorInfo diff --git a/dlls/win32u/main.c b/dlls/win32u/main.c index 4a2a2321d82..928c6a8e3f7 100644 --- a/dlls/win32u/main.c +++ b/dlls/win32u/main.c @@ -1503,6 +1503,11 @@ HWND SYSCALL_API NtUserGetClipboardViewer(void) SYSCALL_FUNC( NtUserGetClipboardViewer ); }
+BOOL SYSCALL_API NtUserGetCurrentInputMessageSource( INPUT_MESSAGE_SOURCE *source ) +{ + SYSCALL_FUNC( NtUserGetCurrentInputMessageSource ); +} + HCURSOR SYSCALL_API NtUserGetCursor(void) { SYSCALL_FUNC( NtUserGetCursor ); diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c index a9b9dec6bfc..99b62546110 100644 --- a/dlls/win32u/message.c +++ b/dlls/win32u/message.c @@ -4631,3 +4631,19 @@ BOOL WINAPI NtUserTranslateMessage( const MSG *msg, UINT flags ) } return TRUE; } + +/*********************************************************************** + * NtUserGetCurrentInputMessageSource (win32u.@) + */ +BOOL WINAPI NtUserGetCurrentInputMessageSource( INPUT_MESSAGE_SOURCE *source ) +{ + TRACE( "source %p.\n", source ); + + if (!source) + { + RtlSetLastWin32Error( ERROR_INVALID_PARAMETER ); + return FALSE; + } + *source = NtUserGetThreadInfo()->msg_source; + return TRUE; +} diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index 72e70482506..487b8117700 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -997,7 +997,7 @@ @ stub NtUserGetControlBrush @ stub NtUserGetControlColor @ stub NtUserGetCurrentDpiInfoForWindow -@ stub NtUserGetCurrentInputMessageSource +@ stdcall -syscall NtUserGetCurrentInputMessageSource(ptr) @ stdcall -syscall NtUserGetCursor() @ stdcall -syscall NtUserGetCursorFrameInfo(long long ptr ptr) @ stdcall -syscall NtUserGetCursorInfo(ptr) diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index d0391e7a8a3..fed656c0b9c 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -2438,6 +2438,13 @@ NTSTATUS WINAPI wow64_NtUserGetClipboardViewer( UINT *args ) return HandleToUlong( NtUserGetClipboardViewer() ); }
+NTSTATUS WINAPI wow64_NtUserGetCurrentInputMessageSource( UINT *args ) +{ + INPUT_MESSAGE_SOURCE *source = get_ptr( &args ); + + return NtUserGetCurrentInputMessageSource( source ); +} + NTSTATUS WINAPI wow64_NtUserGetCursor( UINT *args ) { return HandleToUlong( NtUserGetCursor() ); diff --git a/include/ntuser.h b/include/ntuser.h index 963b549e198..688876fe918 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -811,6 +811,7 @@ W32KAPI INT WINAPI NtUserGetClipboardFormatName( UINT format, WCHAR *buffer, W32KAPI HWND WINAPI NtUserGetClipboardOwner(void); W32KAPI DWORD WINAPI NtUserGetClipboardSequenceNumber(void); W32KAPI HWND WINAPI NtUserGetClipboardViewer(void); +W32KAPI BOOL WINAPI NtUserGetCurrentInputMessageSource( INPUT_MESSAGE_SOURCE *source ); W32KAPI HCURSOR WINAPI NtUserGetCursor(void); W32KAPI HCURSOR WINAPI NtUserGetCursorFrameInfo( HCURSOR hCursor, DWORD istep, DWORD *rate_jiffies, DWORD *num_steps );
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=151101
Your paranoid android.
=== debian11 (build log) ===
/usr/bin/i686-w64-mingw32-ld: tmp67bc6d1e/win32u-00000000.spec.o:fake:(.edata+0xfc4): undefined reference to `NtUserGetCurrentInputMessageSource@4' collect2: error: ld returned 1 exit status Task: The win32 Wine build failed
=== debian11b (build log) ===
/usr/bin/x86_64-w64-mingw32-ld: tmp679da64a/win32u-00000000.spec.o:fake:(.edata+0xfc0): undefined reference to `NtUserGetCurrentInputMessageSource' collect2: error: ld returned 1 exit status Task: The wow64 Wine build failed