Author: tkreuzer
Date: Sun Mar 8 23:36:25 2015
New Revision: 66615
URL: http://svn.reactos.org/svn/reactos?rev=66615&view=rev
Log:
[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
Modified:
trunk/reactos/win32ss/gdi/ntgdi/dclife.c
trunk/reactos/win32ss/gdi/ntgdi/gdiobj.h
Modified: trunk/reactos/win32ss/gdi/ntgdi/dclife.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/dclife.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/dclife.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/dclife.c [iso-8859-1] Sun Mar 8 23:36:25 2015
@@ -86,15 +86,16 @@
/* Set the actual DC type */
pdc->BaseObject.hHmgr = UlongToHandle(eDcObjType);
+ pdc->pdcattr = &pdc->dcattr;
+
/* Insert the object */
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");
GDIOBJ_vFreeObject(&pdc->BaseObject);
return NULL;
}
-
- pdc->pdcattr = &pdc->dcattr;
return pdc;
}
@@ -177,8 +178,6 @@
pdc->erclBoundsApp.bottom = 0x00000333; // FIXME
pdc->erclClip = pdc->erclBounds;
pdc->co = gxcoTrivial;
-
- pdc->fs |= DC_SYNCHRONIZEACCESS | DC_ACCUM_APP | DC_PERMANANT | DC_DISPLAY;
}
else
{
@@ -891,11 +890,13 @@
if (!GreDeleteObject(hDC))
{
DPRINT1("DC_FreeDC failed\n");
+ return FALSE;
}
}
else
{
DPRINT1("Attempted to Delete 0x%p currently being destroyed!!!\n", hDC);
+ return FALSE;
}
return TRUE;
Modified: trunk/reactos/win32ss/gdi/ntgdi/gdiobj.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/gdiobj.h…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/gdiobj.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/gdiobj.h [iso-8859-1] Sun Mar 8 23:36:25 2015
@@ -5,7 +5,7 @@
#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 */
static const unsigned RESERVE_ENTRIES_COUNT = 10;