Author: gadamopoulos
Date: Thu Feb 9 23:18:47 2012
New Revision: 55522
URL:
http://svn.reactos.org/svn/reactos?rev=55522&view=rev
Log:
[win32k]
- fix some more tests in user32:winstation
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c [iso-8859-1] Thu Feb 9
23:18:47 2012
@@ -1243,10 +1243,20 @@
{
PDESKTOP Object;
NTSTATUS Status;
+ PTHREADINFO pti;
DECLARE_RETURN(BOOL);
+
+ pti = PsGetCurrentThreadWin32Thread();
TRACE("Enter NtUserCloseDesktop\n");
UserEnterExclusive();
+
+ if( hDesktop == pti->hdesk || hDesktop == pti->ppi->hdeskStartup)
+ {
+ ERR("Attempted to close thread desktop\n");
+ EngSetLastError(ERROR_BUSY);
+ RETURN(FALSE);
+ }
TRACE("About to close desktop handle (0x%X)\n", hDesktop);