Author: gadamopoulos
Date: Mon Feb 20 10:58:55 2012
New Revision: 55746
URL:
http://svn.reactos.org/svn/reactos?rev=55746&view=rev
Log:
[win32k]
- Create defaultDCstate when the first dc is created not when the first dce is created
- Fix build
Modified:
trunk/reactos/subsystems/win32/win32k/include/dce.h
trunk/reactos/subsystems/win32/win32k/ntuser/windc.c
trunk/reactos/subsystems/win32/win32k/objects/dclife.c
Modified: trunk/reactos/subsystems/win32/win32k/include/dce.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/dce.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/dce.h [iso-8859-1] Mon Feb 20 10:58:55
2012
@@ -41,6 +41,7 @@
#define DCX_NORECOMPUTE 0x00100000
#define DCX_INDESTROY 0x00400000
+INIT_FUNCTION NTSTATUS NTAPI InitDCEImpl(VOID);
PDCE FASTCALL DceAllocDCE(PWND Window, DCE_TYPE Type);
HWND FASTCALL IntWindowFromDC(HDC hDc);
PDCE FASTCALL DceFreeDCE(PDCE dce, BOOLEAN Force);
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/windc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/windc.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/windc.c [iso-8859-1] Mon Feb 20 10:58:55
2012
@@ -24,34 +24,26 @@
/* FUNCTIONS *****************************************************************/
+INIT_FUNCTION
+NTSTATUS
+NTAPI
+InitDCEImpl(VOID)
+{
+ InitializeListHead(&LEDce);
+ return STATUS_SUCCESS;
+}
+
//
// This should be moved to dc.c or dcutil.c.
//
HDC FASTCALL
DceCreateDisplayDC(VOID)
{
- HDC hDC;
- UNICODE_STRING DriverName;
- RtlInitUnicodeString(&DriverName, L"DISPLAY");
- hDC = IntGdiCreateDC(&DriverName, NULL, NULL, NULL, FALSE);
+ UNICODE_STRING DriverName = RTL_CONSTANT_STRING(L"DISPLAY");
co_IntGraphicsCheck(TRUE);
-//
-// If NULL, first time through! Build the default window dc!
-//
- if (hDC && !defaultDCstate) // Ultra HAX! Dedicated to GvG!
- { // This is a cheesy way to do this.
- PDC dc = DC_LockDc ( hDC );
- ASSERT(dc);
- defaultDCstate = ExAllocatePoolWithTag(PagedPool, sizeof(DC), TAG_DC);
- RtlZeroMemory(defaultDCstate, sizeof(DC));
- defaultDCstate->pdcattr = &defaultDCstate->dcattr;
- DC_vCopyState(dc, defaultDCstate, TRUE);
- DC_UnlockDc( dc );
- InitializeListHead(&LEDce);
- }
- return hDC;
+ return IntGdiCreateDC(&DriverName, NULL, NULL, NULL, FALSE);
}
static
Modified: trunk/reactos/subsystems/win32/win32k/objects/dclife.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dclife.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dclife.c [iso-8859-1] Mon Feb 20
10:58:55 2012
@@ -347,6 +347,13 @@
pdc->dcattr.iCS_CP = 0;
pdc->pSurfInfo = NULL;
+ if (defaultDCstate == NULL)
+ {
+ defaultDCstate = ExAllocatePoolWithTag(PagedPool, sizeof(DC), TAG_DC);
+ RtlZeroMemory(defaultDCstate, sizeof(DC));
+ defaultDCstate->pdcattr = &defaultDCstate->dcattr;
+ DC_vCopyState(pdc, defaultDCstate, TRUE);
+ }
}
BOOL