mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 08:55:19 +00:00
[win32k]
- Create defaultDCstate when the first dc is created not when the first dce is created - Fix build svn path=/trunk/; revision=55746
This commit is contained in:
parent
6e4d714573
commit
000dac9eb6
3 changed files with 19 additions and 19 deletions
|
@ -41,6 +41,7 @@ typedef struct tagDCE
|
|||
#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);
|
||||
|
|
|
@ -24,34 +24,26 @@ static INT DCECount = 0; // Count of DCE in system.
|
|||
|
||||
/* 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
|
||||
|
|
|
@ -347,6 +347,13 @@ DC_vInitDc(
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue