mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +00:00
[win32k]
- Remove InputDesktopHandle variable because it is a handle and that means that it can only be used in the context of winlogon - Fixes NtUserOpenInputDesktop which never really worked svn path=/trunk/; revision=57659
This commit is contained in:
parent
d612b03104
commit
005eda32fb
2 changed files with 7 additions and 19 deletions
|
@ -27,7 +27,6 @@ IntFreeDesktopHeap(IN PDESKTOP pdesk);
|
|||
|
||||
/* Currently active desktop */
|
||||
PDESKTOP gpdeskInputDesktop = NULL;
|
||||
HDESK InputDesktopHandle = NULL;
|
||||
HDC ScreenDeviceContext = NULL;
|
||||
PTHREADINFO gptiDesktopThread;
|
||||
HCURSOR gDesktopCursor = NULL;
|
||||
|
@ -1464,40 +1463,31 @@ NtUserOpenInputDesktop(
|
|||
BOOL fInherit,
|
||||
ACCESS_MASK dwDesiredAccess)
|
||||
{
|
||||
PDESKTOP pdesk;
|
||||
NTSTATUS Status;
|
||||
HDESK hdesk = NULL;
|
||||
ULONG HandleAttributes = 0;
|
||||
|
||||
UserEnterExclusive();
|
||||
TRACE("Enter NtUserOpenInputDesktop InputDesktopHandle 0x%p\n",InputDesktopHandle);
|
||||
TRACE("Enter NtUserOpenInputDesktop gpdeskInputDesktop 0x%p\n",gpdeskInputDesktop);
|
||||
|
||||
/* Get a pointer to the desktop object */
|
||||
Status = IntValidateDesktopHandle(InputDesktopHandle, UserMode, 0, &pdesk);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
ERR("Validation of input desktop handle (0x%p) failed\n", InputDesktopHandle);
|
||||
goto Exit;
|
||||
}
|
||||
if(fInherit) HandleAttributes = OBJ_INHERIT;
|
||||
|
||||
/* Create a new handle to the object */
|
||||
Status = ObOpenObjectByPointer(
|
||||
pdesk,
|
||||
0,
|
||||
gpdeskInputDesktop,
|
||||
HandleAttributes,
|
||||
NULL,
|
||||
dwDesiredAccess,
|
||||
ExDesktopObjectType,
|
||||
UserMode,
|
||||
(PHANDLE)&hdesk);
|
||||
|
||||
ObDereferenceObject(pdesk);
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
ERR("Failed to open input desktop object\n");
|
||||
SetLastNtError(Status);
|
||||
goto Exit;
|
||||
}
|
||||
Exit:
|
||||
|
||||
TRACE("NtUserOpenInputDesktop returning 0x%p\n",hdesk);
|
||||
UserLeave();
|
||||
return hdesk;
|
||||
|
@ -1655,8 +1645,7 @@ NtUserSwitchDesktop(HDESK hdesk)
|
|||
|
||||
/* Set the global state. */
|
||||
gpdeskInputDesktop = pdesk;
|
||||
InputDesktopHandle = hdesk;
|
||||
TRACE("SwitchDesktop InputDesktopHandle 0x%p\n",InputDesktopHandle);
|
||||
TRACE("SwitchDesktop gpdeskInputDesktop 0x%p\n",gpdeskInputDesktop);
|
||||
ObDereferenceObject(pdesk);
|
||||
|
||||
RETURN(TRUE);
|
||||
|
|
|
@ -70,7 +70,6 @@ typedef struct _DESKTOP
|
|||
DESKTOP_WRITEOBJECTS
|
||||
|
||||
extern PDESKTOP InputDesktop;
|
||||
extern HDESK InputDesktopHandle;
|
||||
extern PCLS DesktopWindowClass;
|
||||
extern HDC ScreenDeviceContext;
|
||||
extern PTHREADINFO gptiDesktopThread;
|
||||
|
|
Loading…
Reference in a new issue