From: Nikolay Sivov nsivov@codeweavers.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53768 --- dlls/user32/user32.spec | 2 +- dlls/win32u/input.c | 10 ++++++++++ dlls/win32u/syscall.c | 1 + dlls/win32u/win32u.spec | 2 +- dlls/wow64win/syscall.h | 1 + dlls/wow64win/user.c | 11 +++++++++++ include/ntuser.h | 1 + 7 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index 1bf3ebdc90d..4f15b4c06e5 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -182,7 +182,7 @@ @ stdcall DlgDirSelectExA(long ptr long long) @ stdcall DlgDirSelectExW(long ptr long long) @ stdcall DragDetect(long int64) -@ stub DragObject +@ stdcall DragObject(long long long long long) NtUserDragObject @ stdcall DrawAnimatedRects(long long ptr ptr) @ stdcall DrawCaption(long long ptr long) @ stdcall DrawCaptionTempA(long long ptr long long str long) diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c index f3b724e7010..72a15eb1fc0 100644 --- a/dlls/win32u/input.c +++ b/dlls/win32u/input.c @@ -1439,6 +1439,16 @@ BOOL WINAPI NtUserDragDetect( HWND hwnd, int x, int y ) return FALSE; }
+/******************************************************************* + * NtUserDragObject (win32u.@) + */ +DWORD WINAPI NtUserDragObject( HWND parent, HWND hwnd, UINT fmt, ULONG_PTR data, HCURSOR cursor ) +{ + FIXME( "%p, %p, %u, %#lx, %p stub!\n", parent, hwnd, fmt, data, cursor ); + + return 0; +} + /********************************************************************** * set_capture_window */ diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index f9e608ed0b7..73e5dc3e15d 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -140,6 +140,7 @@ static void * const syscalls[] = NtUserDisableThreadIme, NtUserDispatchMessage, NtUserDragDetect, + NtUserDragObject, NtUserDrawIconEx, NtUserEmptyClipboard, NtUserEnableMenuItem, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index df722586ded..cc3431e195a 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -846,7 +846,7 @@ @ stub NtUserDoSoundDisconnect @ stub NtUserDownlevelTouchpad @ stdcall -syscall NtUserDragDetect(long long long) -@ stub NtUserDragObject +@ stdcall -syscall NtUserDragObject(long long long long long) @ stub NtUserDrawAnimatedRects @ stub NtUserDrawCaption @ stdcall NtUserDrawCaptionTemp(long long ptr long long wstr long) diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index 009a457fe6e..7017b344233 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -126,6 +126,7 @@ SYSCALL_ENTRY( NtUserDisableThreadIme ) \ SYSCALL_ENTRY( NtUserDispatchMessage ) \ SYSCALL_ENTRY( NtUserDragDetect ) \ + SYSCALL_ENTRY( NtUserDragObject ) \ SYSCALL_ENTRY( NtUserDrawIconEx ) \ SYSCALL_ENTRY( NtUserEmptyClipboard ) \ SYSCALL_ENTRY( NtUserEnableMenuItem ) \ diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 041285fa37f..761754bd7f9 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -1558,6 +1558,17 @@ NTSTATUS WINAPI wow64_NtUserDragDetect( UINT *args ) return NtUserDragDetect( hwnd, x, y ); }
+NTSTATUS WINAPI wow64_NtUserDragObject( UINT *args ) +{ + HWND parent = get_handle( &args ); + HWND hwnd = get_handle( &args ); + UINT fmt = get_ulong( &args ); + ULONG_PTR data = get_ulong( &args ); + HCURSOR hcursor = get_handle( &args ); + + return NtUserDragObject( parent, hwnd, fmt, data, hcursor ); +} + NTSTATUS WINAPI wow64_NtUserDrawIconEx( UINT *args ) { HDC hdc = get_handle( &args ); diff --git a/include/ntuser.h b/include/ntuser.h index d724ccad103..e987526c11e 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -678,6 +678,7 @@ BOOL WINAPI NtUserDestroyWindow( HWND hwnd ); BOOL WINAPI NtUserDisableThreadIme( DWORD thread_id ); LRESULT WINAPI NtUserDispatchMessage( const MSG *msg ); BOOL WINAPI NtUserDragDetect( HWND hwnd, int x, int y ); +DWORD WINAPI NtUserDragObject( HWND parent, HWND hwnd, UINT fmt, ULONG_PTR data, HCURSOR cursor ); BOOL WINAPI NtUserDrawCaptionTemp( HWND hwnd, HDC hdc, const RECT *rect, HFONT font, HICON icon, const WCHAR *str, UINT flags ); BOOL WINAPI NtUserDrawIconEx( HDC hdc, INT x0, INT y0, HICON icon, INT width,
This imho better lives into clipboard.c (or something else) rather than input.c
I've put it next to DragDetect(). Are those different in that regard?
On Mon Oct 31 07:54:53 2022 +0000, Nikolay Sivov wrote:
I've put it next to DragDetect(). Are those different in that regard?
Ah okay, didn't see that. I guess it makes some sense then.
On Mon Oct 31 07:54:52 2022 +0000, Rémi Bernon wrote:
Ah okay, didn't see that. I guess it makes some sense then.
Actually I find it confusing that user32.c DragDetect is in win.c and win32u one is in input.c. I still feel like drag-n-drop support does not really belong in input.c so I'd prefer to have both moved to window.c.
Also, I don't know why but DragDetect has a user32 wrapper, and you've only added a forward import for DragObject. I think it'd be best to have a wrapper for it too if there's a reason why DragDetect has one.
Actually I find it confusing that user32.c DragDetect is in win.c and win32u one is in input.c. I still feel like drag-n-drop support does not really belong in input.c so I'd prefer to have both moved to window.c.
Ok.
Also, I don't know why but DragDetect has a user32 wrapper, and you've only added a forward import for DragObject. I think it'd be best to have a wrapper for it too if there's a reason why DragDetect has one.
I think it's because of argument differences.