Author: jimtabor
Date: Fri Nov 9 21:05:41 2007
New Revision: 30304
URL:
http://svn.reactos.org/svn/reactos?rev=30304&view=rev
Log:
No need for dca here if the ScreenDeviceContext is set inaccessible. So free the dca.
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c Fri Nov 9 21:05:41 2007
@@ -304,7 +304,8 @@
IntDestroyPrimarySurface();
return FALSE;
}
- DC_SetOwnership(ScreenDeviceContext, NULL);
+ DC_FreeDcAttr(ScreenDeviceContext); // Free the dcattr!
+ DC_SetOwnership(ScreenDeviceContext, NULL); // This hDC is inaccessible!
/* Setup the cursor */
co_IntLoadDefaultCursors();
@@ -316,7 +317,7 @@
IntEndDesktopGraphics(VOID)
{
if (NULL != ScreenDeviceContext)
- {
+ { // No need to allocate a new dcattr.
DC_SetOwnership(ScreenDeviceContext, PsGetCurrentProcess());
NtGdiDeleteObjectApp(ScreenDeviceContext);
ScreenDeviceContext = NULL;