mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 17:42:58 +00:00
[WIN32K]
- Remove wrong flags when initializing a DC - Set DC::prgnattr before potentially passing it to the cleanup function after failure to create a handle. Add a comment that this is not actually enough. Will be fixed, once we use C++ - Increase GDI object stack levels to 20 svn path=/trunk/; revision=66615
This commit is contained in:
parent
6dcd051d62
commit
d52f661e5f
2 changed files with 6 additions and 5 deletions
|
@ -86,16 +86,17 @@ DC_AllocDcWithHandle(GDILOOBJTYPE eDcObjType)
|
||||||
/* Set the actual DC type */
|
/* Set the actual DC type */
|
||||||
pdc->BaseObject.hHmgr = UlongToHandle(eDcObjType);
|
pdc->BaseObject.hHmgr = UlongToHandle(eDcObjType);
|
||||||
|
|
||||||
|
pdc->pdcattr = &pdc->dcattr;
|
||||||
|
|
||||||
/* Insert the object */
|
/* Insert the object */
|
||||||
if (!GDIOBJ_hInsertObject(&pdc->BaseObject, GDI_OBJ_HMGR_POWNED))
|
if (!GDIOBJ_hInsertObject(&pdc->BaseObject, GDI_OBJ_HMGR_POWNED))
|
||||||
{
|
{
|
||||||
|
/// FIXME: this is broken, since the DC is not initialized yet...
|
||||||
DPRINT1("Could not insert DC into handle table.\n");
|
DPRINT1("Could not insert DC into handle table.\n");
|
||||||
GDIOBJ_vFreeObject(&pdc->BaseObject);
|
GDIOBJ_vFreeObject(&pdc->BaseObject);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
pdc->pdcattr = &pdc->dcattr;
|
|
||||||
|
|
||||||
return pdc;
|
return pdc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,8 +178,6 @@ DC_vInitDc(
|
||||||
pdc->erclBoundsApp.bottom = 0x00000333; // FIXME
|
pdc->erclBoundsApp.bottom = 0x00000333; // FIXME
|
||||||
pdc->erclClip = pdc->erclBounds;
|
pdc->erclClip = pdc->erclBounds;
|
||||||
pdc->co = gxcoTrivial;
|
pdc->co = gxcoTrivial;
|
||||||
|
|
||||||
pdc->fs |= DC_SYNCHRONIZEACCESS | DC_ACCUM_APP | DC_PERMANANT | DC_DISPLAY;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -891,11 +890,13 @@ IntGdiDeleteDC(HDC hDC, BOOL Force)
|
||||||
if (!GreDeleteObject(hDC))
|
if (!GreDeleteObject(hDC))
|
||||||
{
|
{
|
||||||
DPRINT1("DC_FreeDC failed\n");
|
DPRINT1("DC_FreeDC failed\n");
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT1("Attempted to Delete 0x%p currently being destroyed!!!\n", hDC);
|
DPRINT1("Attempted to Delete 0x%p currently being destroyed!!!\n", hDC);
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define GDI_OBJECT_STACK_LEVELS 10
|
#define GDI_OBJECT_STACK_LEVELS 20
|
||||||
|
|
||||||
/* The first 10 entries are never used in windows, they are empty */
|
/* The first 10 entries are never used in windows, they are empty */
|
||||||
static const unsigned RESERVE_ENTRIES_COUNT = 10;
|
static const unsigned RESERVE_ENTRIES_COUNT = 10;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue