Jacek Caban : win32u: Move NtUserGetOpenClipboardWindow implementation from user32.
Alexandre Julliard
julliard at winehq.org
Tue Nov 16 16:32:28 CST 2021
Module: wine
Branch: master
Commit: da01911cc17b2d5c1c4920b4ef6cf665f34a1f39
URL: https://source.winehq.org/git/wine.git/?a=commit;h=da01911cc17b2d5c1c4920b4ef6cf665f34a1f39
Author: Jacek Caban <jacek at codeweavers.com>
Date: Tue Nov 16 12:36:26 2021 +0100
win32u: Move NtUserGetOpenClipboardWindow implementation from user32.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user32/clipboard.c | 19 -------------------
dlls/user32/user32.spec | 2 +-
dlls/win32u/clipboard.c | 17 +++++++++++++++++
dlls/win32u/syscall.c | 1 +
dlls/win32u/win32u.spec | 2 +-
dlls/wow64win/syscall.h | 1 +
dlls/wow64win/user.c | 5 +++++
include/ntuser.h | 1 +
8 files changed, 27 insertions(+), 21 deletions(-)
diff --git a/dlls/user32/clipboard.c b/dlls/user32/clipboard.c
index 62a17f5d021..ffeb03d4435 100644
--- a/dlls/user32/clipboard.c
+++ b/dlls/user32/clipboard.c
@@ -750,25 +750,6 @@ BOOL WINAPI EmptyClipboard(void)
}
-/**************************************************************************
- * GetOpenClipboardWindow (USER32.@)
- */
-HWND WINAPI GetOpenClipboardWindow(void)
-{
- HWND hWndOpen = 0;
-
- SERVER_START_REQ( get_clipboard_info )
- {
- if (!wine_server_call_err( req )) hWndOpen = wine_server_ptr_handle( reply->window );
- }
- SERVER_END_REQ;
-
- TRACE( "returning %p\n", hWndOpen );
-
- return hWndOpen;
-}
-
-
/**************************************************************************
* SetClipboardViewer (USER32.@)
*/
diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec
index 99e1157227c..ffab0fca4d4 100644
--- a/dlls/user32/user32.spec
+++ b/dlls/user32/user32.spec
@@ -353,7 +353,7 @@
@ stdcall GetNextDlgGroupItem(long long long)
@ stdcall GetNextDlgTabItem(long long long)
# @ stub GetNextQueueWindow
-@ stdcall GetOpenClipboardWindow()
+@ stdcall GetOpenClipboardWindow() NtUserGetOpenClipboardWindow
@ stdcall GetParent(long)
@ stdcall GetPhysicalCursorPos(ptr)
@ stdcall GetPointerDevices(ptr ptr)
diff --git a/dlls/win32u/clipboard.c b/dlls/win32u/clipboard.c
index 7acab5de631..dca01708803 100644
--- a/dlls/win32u/clipboard.c
+++ b/dlls/win32u/clipboard.c
@@ -222,6 +222,23 @@ HWND WINAPI NtUserGetClipboardViewer(void)
return viewer;
}
+/**************************************************************************
+ * NtUserGetOpenClipboardWindow (win32u.@)
+ */
+HWND WINAPI NtUserGetOpenClipboardWindow(void)
+{
+ HWND window = 0;
+
+ SERVER_START_REQ( get_clipboard_info )
+ {
+ if (!wine_server_call_err( req )) window = wine_server_ptr_handle( reply->window );
+ }
+ SERVER_END_REQ;
+
+ TRACE( "returning %p\n", window );
+ return window;
+}
+
/**************************************************************************
* NtUserGetClipboardSequenceNumber (win32u.@)
*/
diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c
index b6419c08ea0..26471718e51 100644
--- a/dlls/win32u/syscall.c
+++ b/dlls/win32u/syscall.c
@@ -116,6 +116,7 @@ static void * const syscalls[] =
NtUserGetKeyboardState,
NtUserGetLayeredWindowAttributes,
NtUserGetObjectInformation,
+ NtUserGetOpenClipboardWindow,
NtUserGetProcessWindowStation,
NtUserGetProp,
NtUserGetThreadDesktop,
diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec
index 1353924845c..2f4b36babe5 100644
--- a/dlls/win32u/win32u.spec
+++ b/dlls/win32u/win32u.spec
@@ -959,7 +959,7 @@
@ stub NtUserGetMouseMovePointsEx
@ stdcall -syscall NtUserGetObjectInformation(long long long long ptr)
@ stub NtUserGetOemBitmapSize
-@ stub NtUserGetOpenClipboardWindow
+@ stdcall -syscall NtUserGetOpenClipboardWindow()
@ stub NtUserGetOwnerTransformedMonitorRect
@ stub NtUserGetPhysicalDeviceRect
@ stub NtUserGetPointerCursorId
diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h
index 09a281b5d14..d97563427ce 100644
--- a/dlls/wow64win/syscall.h
+++ b/dlls/wow64win/syscall.h
@@ -102,6 +102,7 @@
SYSCALL_ENTRY( NtUserGetKeyboardState ) \
SYSCALL_ENTRY( NtUserGetLayeredWindowAttributes ) \
SYSCALL_ENTRY( NtUserGetObjectInformation ) \
+ SYSCALL_ENTRY( NtUserGetOpenClipboardWindow ) \
SYSCALL_ENTRY( NtUserGetProcessWindowStation ) \
SYSCALL_ENTRY( NtUserGetProp ) \
SYSCALL_ENTRY( NtUserGetThreadDesktop ) \
diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c
index 4c47b8937cf..39f54ae82ba 100644
--- a/dlls/wow64win/user.c
+++ b/dlls/wow64win/user.c
@@ -205,6 +205,11 @@ NTSTATUS WINAPI wow64_NtUserGetClipboardOwner( UINT *args )
return HandleToUlong( NtUserGetClipboardOwner() );
}
+NTSTATUS WINAPI wow64_NtUserGetOpenClipboardWindow( UINT *args )
+{
+ return HandleToUlong( NtUserGetOpenClipboardWindow() );
+}
+
NTSTATUS WINAPI wow64_NtUserGetClipboardSequenceNumber( UINT *args )
{
return NtUserGetClipboardSequenceNumber();
diff --git a/include/ntuser.h b/include/ntuser.h
index d06a0aee429..536e78dfda5 100644
--- a/include/ntuser.h
+++ b/include/ntuser.h
@@ -74,6 +74,7 @@ BOOL WINAPI NtUserGetKeyboardState( BYTE *state );
BOOL WINAPI NtUserGetLayeredWindowAttributes( HWND hwnd, COLORREF *key, BYTE *alpha, DWORD *flags );
BOOL WINAPI NtUserGetObjectInformation( HANDLE handle, INT index, void *info,
DWORD len, DWORD *needed );
+HWND WINAPI NtUserGetOpenClipboardWindow(void);
INT WINAPI NtUserGetPriorityClipboardFormat( UINT *list, INT count );
HWINSTA WINAPI NtUserGetProcessWindowStation(void);
HANDLE WINAPI NtUserGetProp( HWND hwnd, const WCHAR *str );
More information about the wine-cvs
mailing list