Commit 588dc55e authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Move NtUserGetProcessWindowStation implementation from user32.

parent 1bc3ca71
...@@ -95,7 +95,7 @@ static const USER_DRIVER *load_driver(void) ...@@ -95,7 +95,7 @@ static const USER_DRIVER *load_driver(void)
USEROBJECTFLAGS flags; USEROBJECTFLAGS flags;
HWINSTA winstation; HWINSTA winstation;
winstation = GetProcessWindowStation(); winstation = NtUserGetProcessWindowStation();
if (!GetUserObjectInformationA(winstation, UOI_FLAGS, &flags, sizeof(flags), NULL) if (!GetUserObjectInformationA(winstation, UOI_FLAGS, &flags, sizeof(flags), NULL)
|| (flags.dwFlags & WSF_VISIBLE)) || (flags.dwFlags & WSF_VISIBLE))
driver->pCreateWindow = nodrv_CreateWindow; driver->pCreateWindow = nodrv_CreateWindow;
......
...@@ -4120,7 +4120,7 @@ BOOL CDECL nulldrv_EnumDisplayMonitors( HDC hdc, RECT *rect, MONITORENUMPROC pro ...@@ -4120,7 +4120,7 @@ BOOL CDECL nulldrv_EnumDisplayMonitors( HDC hdc, RECT *rect, MONITORENUMPROC pro
TRACE("(%p, %p, %p, 0x%lx)\n", hdc, rect, proc, lp); TRACE("(%p, %p, %p, 0x%lx)\n", hdc, rect, proc, lp);
/* Report physical monitor information only if window station has visible display surfaces */ /* Report physical monitor information only if window station has visible display surfaces */
winstation = GetProcessWindowStation(); winstation = NtUserGetProcessWindowStation();
if (GetUserObjectInformationW( winstation, UOI_FLAGS, &flags, sizeof(flags), NULL )) if (GetUserObjectInformationW( winstation, UOI_FLAGS, &flags, sizeof(flags), NULL ))
is_winstation_visible = flags.dwFlags & WSF_VISIBLE; is_winstation_visible = flags.dwFlags & WSF_VISIBLE;
......
...@@ -361,7 +361,7 @@ ...@@ -361,7 +361,7 @@
@ stdcall GetPriorityClipboardFormat(ptr long) @ stdcall GetPriorityClipboardFormat(ptr long)
@ stdcall GetProcessDefaultLayout(ptr) @ stdcall GetProcessDefaultLayout(ptr)
@ stdcall GetProcessDpiAwarenessInternal(long ptr) @ stdcall GetProcessDpiAwarenessInternal(long ptr)
@ stdcall GetProcessWindowStation() @ stdcall GetProcessWindowStation() NtUserGetProcessWindowStation
@ stdcall GetProgmanWindow () @ stdcall GetProgmanWindow ()
@ stdcall GetPropA(long str) @ stdcall GetPropA(long str)
@ stdcall GetPropW(long wstr) @ stdcall GetPropW(long wstr)
......
...@@ -290,7 +290,7 @@ static void winstation_init(void) ...@@ -290,7 +290,7 @@ static void winstation_init(void)
} }
/* set winstation if explicitly specified, or if we don't have one yet */ /* set winstation if explicitly specified, or if we don't have one yet */
if (buffer || !GetProcessWindowStation()) if (buffer || !NtUserGetProcessWindowStation())
{ {
handle = CreateWindowStationW( winstation ? winstation : L"WinSta0", 0, WINSTA_ALL_ACCESS, NULL ); handle = CreateWindowStationW( winstation ? winstation : L"WinSta0", 0, WINSTA_ALL_ACCESS, NULL );
if (handle) if (handle)
......
...@@ -203,23 +203,6 @@ HWINSTA WINAPI OpenWindowStationW( LPCWSTR name, BOOL inherit, ACCESS_MASK acces ...@@ -203,23 +203,6 @@ HWINSTA WINAPI OpenWindowStationW( LPCWSTR name, BOOL inherit, ACCESS_MASK acces
} }
/******************************************************************************
* GetProcessWindowStation (USER32.@)
*/
HWINSTA WINAPI GetProcessWindowStation(void)
{
HWINSTA ret = 0;
SERVER_START_REQ( get_process_winstation )
{
if (!wine_server_call_err( req ))
ret = wine_server_ptr_handle( reply->handle );
}
SERVER_END_REQ;
return ret;
}
/*********************************************************************** /***********************************************************************
* SetProcessWindowStation (USER32.@) * SetProcessWindowStation (USER32.@)
*/ */
...@@ -472,7 +455,7 @@ BOOL WINAPI EnumDesktopsW( HWINSTA winsta, DESKTOPENUMPROCW func, LPARAM lparam ...@@ -472,7 +455,7 @@ BOOL WINAPI EnumDesktopsW( HWINSTA winsta, DESKTOPENUMPROCW func, LPARAM lparam
NTSTATUS status; NTSTATUS status;
if (!winsta) if (!winsta)
winsta = GetProcessWindowStation(); winsta = NtUserGetProcessWindowStation();
while (ret) while (ret)
{ {
......
...@@ -95,6 +95,7 @@ static void * const syscalls[] = ...@@ -95,6 +95,7 @@ static void * const syscalls[] =
NtGdiSwapBuffers, NtGdiSwapBuffers,
NtGdiTransformPoints, NtGdiTransformPoints,
NtUserCloseWindowStation, NtUserCloseWindowStation,
NtUserGetProcessWindowStation,
}; };
static BYTE arguments[ARRAY_SIZE(syscalls)]; static BYTE arguments[ARRAY_SIZE(syscalls)];
......
...@@ -979,7 +979,7 @@ ...@@ -979,7 +979,7 @@
@ stub NtUserGetPriorityClipboardFormat @ stub NtUserGetPriorityClipboardFormat
@ stub NtUserGetProcessDpiAwarenessContext @ stub NtUserGetProcessDpiAwarenessContext
@ stub NtUserGetProcessUIContextInformation @ stub NtUserGetProcessUIContextInformation
@ stub NtUserGetProcessWindowStation @ stdcall -syscall NtUserGetProcessWindowStation()
@ stub NtUserGetProp @ stub NtUserGetProp
@ stub NtUserGetQueueStatus @ stub NtUserGetQueueStatus
@ stub NtUserGetQueueStatusReadonly @ stub NtUserGetQueueStatusReadonly
......
...@@ -43,3 +43,19 @@ BOOL WINAPI NtUserCloseWindowStation( HWINSTA handle ) ...@@ -43,3 +43,19 @@ BOOL WINAPI NtUserCloseWindowStation( HWINSTA handle )
SERVER_END_REQ; SERVER_END_REQ;
return ret; return ret;
} }
/***********************************************************************
* NtUSerGetProcessWindowStation (win32u.@)
*/
HWINSTA WINAPI NtUserGetProcessWindowStation(void)
{
HWINSTA ret = 0;
SERVER_START_REQ( get_process_winstation )
{
if (!wine_server_call_err( req ))
ret = wine_server_ptr_handle( reply->handle );
}
SERVER_END_REQ;
return ret;
}
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
SYSCALL_ENTRY( NtGdiSetVirtualResolution ) \ SYSCALL_ENTRY( NtGdiSetVirtualResolution ) \
SYSCALL_ENTRY( NtGdiSwapBuffers ) \ SYSCALL_ENTRY( NtGdiSwapBuffers ) \
SYSCALL_ENTRY( NtGdiTransformPoints ) \ SYSCALL_ENTRY( NtGdiTransformPoints ) \
SYSCALL_ENTRY( NtUserCloseWindowStation ) SYSCALL_ENTRY( NtUserCloseWindowStation ) \
SYSCALL_ENTRY( NtUserGetProcessWindowStation )
#endif /* __WOW64WIN_SYSCALL_H */ #endif /* __WOW64WIN_SYSCALL_H */
...@@ -33,3 +33,8 @@ NTSTATUS WINAPI wow64_NtUserCloseWindowStation( UINT *args ) ...@@ -33,3 +33,8 @@ NTSTATUS WINAPI wow64_NtUserCloseWindowStation( UINT *args )
return NtUserCloseWindowStation( handle ); return NtUserCloseWindowStation( handle );
} }
NTSTATUS WINAPI wow64_NtUserGetProcessWindowStation( UINT *args )
{
return HandleToUlong( NtUserGetProcessWindowStation() );
}
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <winuser.h> #include <winuser.h>
#include <winternl.h> #include <winternl.h>
BOOL WINAPI NtUserCloseWindowStation( HWINSTA handle ); BOOL WINAPI NtUserCloseWindowStation( HWINSTA handle );
HWINSTA WINAPI NtUserGetProcessWindowStation(void);
#endif /* _NTUSER_ */ #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