win32u: Move NtUserCloseDesktop implementation from user32.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2021-10-13 14:53:36 +02:00 committed by Alexandre Julliard
parent 187b3e2cdf
commit ccf00c6d95
9 changed files with 28 additions and 19 deletions

View File

@ -4321,7 +4321,7 @@ static BOOL CALLBACK bcast_desktop( LPWSTR desktop, LPARAM lp )
}
ret = EnumDesktopWindows( hdesktop, bcast_childwindow, lp );
CloseDesktop(hdesktop);
NtUserCloseDesktop( hdesktop );
TRACE("-->%d\n", ret);
return parm->success;
}

View File

@ -74,7 +74,7 @@
@ stdcall ClientToScreen(long ptr)
@ stdcall ClipCursor(ptr)
@ stdcall CloseClipboard()
@ stdcall CloseDesktop(long)
@ stdcall CloseDesktop(long) NtUserCloseDesktop
@ stdcall CloseTouchInputHandle(long)
@ stdcall CloseWindow(long)
@ stdcall CloseWindowStation(long) NtUserCloseWindowStation

View File

@ -357,22 +357,6 @@ HDESK WINAPI OpenDesktopW( LPCWSTR name, DWORD flags, BOOL inherit, ACCESS_MASK
}
/***********************************************************************
* CloseDesktop (USER32.@)
*/
BOOL WINAPI CloseDesktop( HDESK handle )
{
BOOL ret;
SERVER_START_REQ( close_desktop )
{
req->handle = wine_server_obj_handle( handle );
ret = !wine_server_call_err( req );
}
SERVER_END_REQ;
return ret;
}
/******************************************************************************
* GetThreadDesktop (USER32.@)
*/

View File

@ -94,6 +94,7 @@ static void * const syscalls[] =
NtGdiSetVirtualResolution,
NtGdiSwapBuffers,
NtGdiTransformPoints,
NtUserCloseDesktop,
NtUserCloseWindowStation,
NtUserGetProcessWindowStation,
NtUserSetProcessWindowStation,

View File

@ -794,7 +794,7 @@
@ stub NtUserClearForeground
@ stub NtUserClipCursor
@ stub NtUserCloseClipboard
@ stub NtUserCloseDesktop
@ stdcall -syscall NtUserCloseDesktop(long)
@ stdcall -syscall NtUserCloseWindowStation(long)
@ stub NtUserCompositionInputSinkLuidFromPoint
@ stub NtUserCompositionInputSinkViewInstanceIdFromPoint

View File

@ -75,3 +75,18 @@ BOOL WINAPI NtUserSetProcessWindowStation( HWINSTA handle )
SERVER_END_REQ;
return ret;
}
/***********************************************************************
* NtUserCloseDesktop (win32u.@)
*/
BOOL WINAPI NtUserCloseDesktop( HDESK handle )
{
BOOL ret;
SERVER_START_REQ( close_desktop )
{
req->handle = wine_server_obj_handle( handle );
ret = !wine_server_call_err( req );
}
SERVER_END_REQ;
return ret;
}

View File

@ -81,6 +81,7 @@
SYSCALL_ENTRY( NtGdiSetVirtualResolution ) \
SYSCALL_ENTRY( NtGdiSwapBuffers ) \
SYSCALL_ENTRY( NtGdiTransformPoints ) \
SYSCALL_ENTRY( NtUserCloseDesktop ) \
SYSCALL_ENTRY( NtUserCloseWindowStation ) \
SYSCALL_ENTRY( NtUserGetProcessWindowStation ) \
SYSCALL_ENTRY( NtUserSetProcessWindowStation )

View File

@ -45,3 +45,10 @@ NTSTATUS WINAPI wow64_NtUserSetProcessWindowStation( UINT *args )
return NtUserSetProcessWindowStation( handle );
}
NTSTATUS WINAPI wow64_NtUserCloseDesktop( UINT *args )
{
HDESK handle = get_handle( &args );
return NtUserCloseDesktop( handle );
}

View File

@ -22,6 +22,7 @@
#include <winuser.h>
#include <winternl.h>
BOOL WINAPI NtUserCloseDesktop( HDESK handle );
BOOL WINAPI NtUserCloseWindowStation( HWINSTA handle );
HWINSTA WINAPI NtUserGetProcessWindowStation(void);
BOOL WINAPI NtUserSetProcessWindowStation( HWINSTA handle );