Commit 915fb568 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Move NtUserGetThreadDesktop implementation from user32.

parent ccf00c6d
......@@ -387,7 +387,7 @@
@ stdcall GetTabbedTextExtentA(long str long long ptr)
@ stdcall GetTabbedTextExtentW(long wstr long long ptr)
@ stdcall GetTaskmanWindow ()
@ stdcall GetThreadDesktop(long)
@ stdcall GetThreadDesktop(long) NtUserGetThreadDesktop
@ stdcall GetThreadDpiAwarenessContext()
@ stdcall GetTitleBarInfo(long ptr)
@ stdcall GetTopWindow(long)
......
......@@ -307,7 +307,7 @@ static void winstation_init(void)
}
}
}
if (buffer || !GetThreadDesktop( GetCurrentThreadId() ))
if (buffer || !NtUserGetThreadDesktop( GetCurrentThreadId() ))
{
handle = CreateDesktopW( desktop ? desktop : get_default_desktop(),
NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL );
......
......@@ -2231,7 +2231,7 @@ HWND WINAPI GetDesktopWindow(void)
SERVER_START_REQ( set_user_object_info )
{
req->handle = wine_server_obj_handle( GetThreadDesktop(GetCurrentThreadId()) );
req->handle = wine_server_obj_handle( NtUserGetThreadDesktop(GetCurrentThreadId()) );
req->flags = SET_USER_OBJECT_GET_FULL_NAME;
wine_server_set_reply( req, desktop, sizeof(desktop) - sizeof(WCHAR) );
if (!wine_server_call( req ))
......
......@@ -358,23 +358,6 @@ HDESK WINAPI OpenDesktopW( LPCWSTR name, DWORD flags, BOOL inherit, ACCESS_MASK
/******************************************************************************
* GetThreadDesktop (USER32.@)
*/
HDESK WINAPI GetThreadDesktop( DWORD thread )
{
HDESK ret = 0;
SERVER_START_REQ( get_thread_desktop )
{
req->tid = thread;
if (!wine_server_call_err( req )) ret = wine_server_ptr_handle( reply->handle );
}
SERVER_END_REQ;
return ret;
}
/******************************************************************************
* SetThreadDesktop (USER32.@)
*/
BOOL WINAPI SetThreadDesktop( HDESK handle )
......
......@@ -97,6 +97,7 @@ static void * const syscalls[] =
NtUserCloseDesktop,
NtUserCloseWindowStation,
NtUserGetProcessWindowStation,
NtUserGetThreadDesktop,
NtUserSetProcessWindowStation,
};
......
......@@ -995,7 +995,7 @@
@ stub NtUserGetSharedWindowData
@ stub NtUserGetSystemDpiForProcess
@ stub NtUserGetSystemMenu
@ stub NtUserGetThreadDesktop
@ stdcall -syscall NtUserGetThreadDesktop(long)
@ stub NtUserGetThreadState
@ stub NtUserGetTitleBarInfo
@ stub NtUserGetTopLevelWindow
......
......@@ -90,3 +90,19 @@ BOOL WINAPI NtUserCloseDesktop( HDESK handle )
SERVER_END_REQ;
return ret;
}
/***********************************************************************
* NtUserGetThreadDesktop (win32u.@)
*/
HDESK WINAPI NtUserGetThreadDesktop( DWORD thread )
{
HDESK ret = 0;
SERVER_START_REQ( get_thread_desktop )
{
req->tid = thread;
if (!wine_server_call_err( req )) ret = wine_server_ptr_handle( reply->handle );
}
SERVER_END_REQ;
return ret;
}
......@@ -84,6 +84,7 @@
SYSCALL_ENTRY( NtUserCloseDesktop ) \
SYSCALL_ENTRY( NtUserCloseWindowStation ) \
SYSCALL_ENTRY( NtUserGetProcessWindowStation ) \
SYSCALL_ENTRY( NtUserGetThreadDesktop ) \
SYSCALL_ENTRY( NtUserSetProcessWindowStation )
#endif /* __WOW64WIN_SYSCALL_H */
......@@ -52,3 +52,10 @@ NTSTATUS WINAPI wow64_NtUserCloseDesktop( UINT *args )
return NtUserCloseDesktop( handle );
}
NTSTATUS WINAPI wow64_NtUserGetThreadDesktop( UINT *args )
{
DWORD thread = get_ulong( &args );
return HandleToUlong( NtUserGetThreadDesktop( thread ));
}
......@@ -25,6 +25,7 @@
BOOL WINAPI NtUserCloseDesktop( HDESK handle );
BOOL WINAPI NtUserCloseWindowStation( HWINSTA handle );
HWINSTA WINAPI NtUserGetProcessWindowStation(void);
HDESK WINAPI NtUserGetThreadDesktop( DWORD thread );
BOOL WINAPI NtUserSetProcessWindowStation( HWINSTA handle );
#endif /* _NTUSER_ */
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