Commit 22de8297 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Move NtUserCloseClipboard implementation from user32.

parent d513eee3
......@@ -675,31 +675,6 @@ BOOL WINAPI OpenClipboard( HWND hwnd )
/**************************************************************************
* CloseClipboard (USER32.@)
*/
BOOL WINAPI CloseClipboard(void)
{
HWND viewer = 0, owner = 0;
BOOL ret;
TRACE( "\n" );
SERVER_START_REQ( close_clipboard )
{
if ((ret = !wine_server_call_err( req )))
{
viewer = wine_server_ptr_handle( reply->viewer );
owner = wine_server_ptr_handle( reply->owner );
}
}
SERVER_END_REQ;
if (viewer) SendNotifyMessageW( viewer, WM_DRAWCLIPBOARD, (WPARAM)owner, 0 );
return ret;
}
/**************************************************************************
* EmptyClipboard (USER32.@)
* Empties and acquires ownership of the clipboard
*/
......
......@@ -3107,7 +3107,7 @@ static void EDIT_WM_Paste(EDITSTATE *es)
/* clear selected text in password edit box even with empty clipboard */
EDIT_EM_ReplaceSel(es, TRUE, NULL, 0, TRUE, TRUE);
}
CloseClipboard();
NtUserCloseClipboard();
}
......@@ -3136,7 +3136,7 @@ static void EDIT_WM_Copy(EDITSTATE *es)
OpenClipboard(es->hwndSelf);
EmptyClipboard();
SetClipboardData(CF_UNICODETEXT, hdst);
CloseClipboard();
NtUserCloseClipboard();
}
......
......@@ -73,7 +73,7 @@
@ stub ClientThreadSetup
@ stdcall ClientToScreen(long ptr)
@ stdcall -import ClipCursor(ptr) NtUserClipCursor
@ stdcall CloseClipboard()
@ stdcall CloseClipboard() NtUserCloseClipboard
@ stdcall CloseDesktop(long) NtUserCloseDesktop
@ stdcall CloseTouchInputHandle(long)
@ stdcall CloseWindow(long)
......
......@@ -77,6 +77,31 @@ static const char *debugstr_format( UINT id )
}
/**************************************************************************
* NtUserCloseClipboard (win32u.@)
*/
BOOL WINAPI NtUserCloseClipboard(void)
{
HWND viewer = 0, owner = 0;
BOOL ret;
TRACE( "\n" );
SERVER_START_REQ( close_clipboard )
{
if ((ret = !wine_server_call_err( req )))
{
viewer = wine_server_ptr_handle( reply->viewer );
owner = wine_server_ptr_handle( reply->owner );
}
}
SERVER_END_REQ;
if (viewer) NtUserMessageCall( viewer, WM_DRAWCLIPBOARD, (WPARAM)owner, 0,
0, FNID_SENDNOTIFYMESSAGE, FALSE );
return ret;
}
/**************************************************************************
* NtUserCountClipboardFormats (win32u.@)
*/
INT WINAPI NtUserCountClipboardFormats(void)
......
......@@ -1159,6 +1159,7 @@ static struct unix_funcs unix_funcs =
NtUserCallTwoParam,
NtUserChangeDisplaySettings,
NtUserClipCursor,
NtUserCloseClipboard,
NtUserCountClipboardFormats,
NtUserCreateWindowEx,
NtUserDeferWindowPosAndBand,
......
......@@ -793,7 +793,7 @@
@ stub NtUserChildWindowFromPointEx
@ stub NtUserClearForeground
@ stdcall NtUserClipCursor(ptr)
@ stub NtUserCloseClipboard
@ stdcall NtUserCloseClipboard()
@ stdcall -syscall NtUserCloseDesktop(long)
@ stdcall -syscall NtUserCloseWindowStation(long)
@ stub NtUserCompositionInputSinkLuidFromPoint
......
......@@ -194,6 +194,7 @@ struct unix_funcs
LONG (WINAPI *pNtUserChangeDisplaySettings)( UNICODE_STRING *devname, DEVMODEW *devmode, HWND hwnd,
DWORD flags, void *lparam );
BOOL (WINAPI *pNtUserClipCursor)( const RECT *rect );
BOOL (WINAPI *pNtUserCloseClipboard)(void);
INT (WINAPI *pNtUserCountClipboardFormats)(void);
HWND (WINAPI *pNtUserCreateWindowEx)( DWORD ex_style, UNICODE_STRING *class_name,
UNICODE_STRING *version, UNICODE_STRING *window_name,
......
......@@ -749,6 +749,12 @@ ULONG_PTR WINAPI NtUserCallHwndParam( HWND hwnd, DWORD_PTR param, DWORD code )
return unix_funcs->pNtUserCallHwndParam( hwnd, param, code );
}
BOOL WINAPI NtUserCloseClipboard(void)
{
if (!unix_funcs) return FALSE;
return unix_funcs->pNtUserCloseClipboard();
}
LONG WINAPI NtUserChangeDisplaySettings( UNICODE_STRING *devname, DEVMODEW *devmode, HWND hwnd,
DWORD flags, void *lparam )
{
......
......@@ -507,6 +507,7 @@ ULONG_PTR WINAPI NtUserCallTwoParam( ULONG_PTR arg1, ULONG_PTR arg2, ULONG code
LONG WINAPI NtUserChangeDisplaySettings( UNICODE_STRING *devname, DEVMODEW *devmode, HWND hwnd,
DWORD flags, void *lparam );
BOOL WINAPI NtUserClipCursor( const RECT *rect );
BOOL WINAPI NtUserCloseClipboard(void);
BOOL WINAPI NtUserCloseDesktop( HDESK handle );
BOOL WINAPI NtUserCloseWindowStation( HWINSTA handle );
INT WINAPI NtUserCopyAcceleratorTable( HACCEL src, ACCEL *dst, INT count );
......
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