Attempt to fix bug 3259. Use IntGdiCleanDC for error checking.

svn path=/trunk/; revision=33863
This commit is contained in:
James Tabor
2008-06-06 02:59:12 +00:00
parent af03c08689
commit 4d4d130154
3 changed files with 6 additions and 6 deletions
@@ -261,6 +261,8 @@ typedef struct _GDIDEVICE
#define DC_UnlockDc(pDC) \
GDIOBJ_UnlockObjByPtr ((POBJ)pDC)
extern PDC defaultDCstate;
NTSTATUS FASTCALL InitDcImpl(VOID);
PGDIDEVICE FASTCALL IntEnumHDev(VOID);
HDC FASTCALL DC_AllocDC(PUNICODE_STRING Driver);
@@ -19,7 +19,6 @@
/* NOTE - I think we should store this per window station (including gdi objects) */
static PDCE FirstDce = NULL;
static PDC defaultDCstate = NULL;
//static INT DCECount = 0; // Count of DCE in system.
#define DCX_CACHECOMPAREMASK (DCX_CLIPSIBLINGS | DCX_CLIPCHILDREN | \
@@ -228,13 +227,11 @@ DceReleaseDC(DCE* dce, BOOL EndPaint)
{
if (!(dce->DCXFlags & DCX_NORESETATTRS))
{
PDC dc;
/* make the DC clean so that SetDCState doesn't try to update the vis rgn */
IntGdiSetHookFlags(dce->hDC, DCHF_VALIDATEVISRGN);
dc = DC_LockDc ( dce->hDC );
// Clean the DC
IntGdiCopyFromSaveState(dc, defaultDCstate, dce->hDC ); // Was SetDCState.
if (!IntGdiCleanDC(dce->hDC)) return 0;
dce->DCXFlags &= ~DCX_DCEBUSY;
if (dce->DCXFlags & DCX_DCEDIRTY)
+3 -2
View File
@@ -33,7 +33,7 @@ static GDIDEVICE PrimarySurface;
PGDIDEVICE pPrimarySurface = &PrimarySurface;
static KEVENT VideoDriverNeedsPreparation;
static KEVENT VideoDriverPrepared;
static PDC defaultDCstate = NULL;
PDC defaultDCstate = NULL;
NTSTATUS FASTCALL
@@ -952,10 +952,11 @@ BOOL FASTCALL
IntGdiCleanDC(HDC hDC)
{
PDC dc;
if (!hDC) return FALSE;
dc = DC_LockDc ( hDC );
if (!dc) return FALSE;
// Clean the DC
if (defaultDCstate) IntGdiCopyFromSaveState(dc, defaultDCstate, hDC );
DC_UnlockDc(dc);
return TRUE;
}