- System regions do not possess user attribute sections. See bug 5124.
- Read the patch for more information.
svn path=/trunk/; revision=45168
if (Dc->rosdc.hClipRgn == NULL)
NtGdiCombineRgn(Dc->rosdc.hGCClipRgn, Dc->rosdc.hVisRgn, 0, RGN_COPY);
if (Dc->rosdc.hClipRgn == NULL)
NtGdiCombineRgn(Dc->rosdc.hGCClipRgn, Dc->rosdc.hVisRgn, 0, RGN_COPY);
+ else // FYI: Vis == NULL! source of "IntGdiCombineRgn requires hSrc2 != NULL for combine mode 1!"
NtGdiCombineRgn(Dc->rosdc.hGCClipRgn, Dc->rosdc.hClipRgn, Dc->rosdc.hVisRgn, RGN_AND);
NtGdiOffsetRgn(Dc->rosdc.hGCClipRgn, Dc->ptlDCOrig.x, Dc->ptlDCOrig.y);
NtGdiCombineRgn(Dc->rosdc.hGCClipRgn, Dc->rosdc.hClipRgn, Dc->rosdc.hVisRgn, RGN_AND);
NtGdiOffsetRgn(Dc->rosdc.hGCClipRgn, Dc->ptlDCOrig.x, Dc->ptlDCOrig.y);
FASTCALL
DC_SetOwnership(HDC hDC, PEPROCESS Owner)
{
FASTCALL
DC_SetOwnership(HDC hDC, PEPROCESS Owner)
{
+ INT Index;
+ PGDI_TABLE_ENTRY Entry;
PDC pDC;
if (!GDIOBJ_SetOwnership(hDC, Owner)) return FALSE;
pDC = DC_LockDc(hDC);
if (pDC)
{
PDC pDC;
if (!GDIOBJ_SetOwnership(hDC, Owner)) return FALSE;
pDC = DC_LockDc(hDC);
if (pDC)
{
+ /*
+ System Regions:
+ These regions do not use attribute sections and when allocated, use
+ gdiobj level functions.
+ */
+ { // FIXME! HAX!!!
+ KeEnterCriticalRegion();
+ Index = GDI_HANDLE_GET_INDEX(pDC->rosdc.hClipRgn);
+ Entry = &GdiHandleTable->Entries[Index];
+ if (Entry->UserData) FreeObjectAttr(Entry->UserData);
+ Entry->UserData = NULL;
+ KeLeaveCriticalRegion();
+ //
if (!GDIOBJ_SetOwnership(pDC->rosdc.hClipRgn, Owner)) return FALSE;
}
if (pDC->rosdc.hVisRgn)
if (!GDIOBJ_SetOwnership(pDC->rosdc.hClipRgn, Owner)) return FALSE;
}
if (pDC->rosdc.hVisRgn)
+ { // FIXME! HAX!!!
+ KeEnterCriticalRegion();
+ Index = GDI_HANDLE_GET_INDEX(pDC->rosdc.hVisRgn);
+ Entry = &GdiHandleTable->Entries[Index];
+ if (Entry->UserData) FreeObjectAttr(Entry->UserData);
+ Entry->UserData = NULL;
+ KeLeaveCriticalRegion();
+ //
if (!GDIOBJ_SetOwnership(pDC->rosdc.hVisRgn, Owner)) return FALSE;
}
if (pDC->rosdc.hGCClipRgn)
if (!GDIOBJ_SetOwnership(pDC->rosdc.hVisRgn, Owner)) return FALSE;
}
if (pDC->rosdc.hGCClipRgn)
+ { // FIXME! HAX!!!
+ KeEnterCriticalRegion();
+ Index = GDI_HANDLE_GET_INDEX(pDC->rosdc.hGCClipRgn);
+ Entry = &GdiHandleTable->Entries[Index];
+ if (Entry->UserData) FreeObjectAttr(Entry->UserData);
+ Entry->UserData = NULL;
+ KeLeaveCriticalRegion();
+ //
if (!GDIOBJ_SetOwnership(pDC->rosdc.hGCClipRgn, Owner)) return FALSE;
}
if (pDC->dclevel.hPath)
if (!GDIOBJ_SetOwnership(pDC->rosdc.hGCClipRgn, Owner)) return FALSE;
}
if (pDC->dclevel.hPath)
if (pAttr)
{
KeEnterCriticalRegion();
if (pAttr)
{
KeEnterCriticalRegion();
+ if (pAttr) FreeObjectAttr(pAttr);
+ Entry->UserData = NULL;
KeLeaveCriticalRegion();
}
break;
KeLeaveCriticalRegion();
}
break;
PGDI_TABLE_ENTRY Entry;
PROSRGNDATA pRgn;
PRGN_ATTR pRgn_Attr;
PGDI_TABLE_ENTRY Entry;
PROSRGNDATA pRgn;
PRGN_ATTR pRgn_Attr;
pRgn = REGION_LockRgn(hRgn);
pRgn = REGION_LockRgn(hRgn);
Index = GDI_HANDLE_GET_INDEX(hRgn);
Entry = &GdiHandleTable->Entries[Index];
pRgn_Attr = Entry->UserData;
Index = GDI_HANDLE_GET_INDEX(hRgn);
Entry = &GdiHandleTable->Entries[Index];
pRgn_Attr = Entry->UserData;
+ pid = (HANDLE)((ULONG_PTR)Entry->ProcessId & ~0x1);
+ if ( pid == NtCurrentTeb()->ClientId.UniqueProcess &&
+ pRgn_Attr )
INT Index;
PGDI_TABLE_ENTRY Entry;
PRGN_ATTR pRgn_Attr;
INT Index;
PGDI_TABLE_ENTRY Entry;
PRGN_ATTR pRgn_Attr;
Index = GDI_HANDLE_GET_INDEX(pRgn->BaseObject.hHmgr);
Entry = &GdiHandleTable->Entries[Index];
pRgn_Attr = Entry->UserData;
Index = GDI_HANDLE_GET_INDEX(pRgn->BaseObject.hHmgr);
Entry = &GdiHandleTable->Entries[Index];
pRgn_Attr = Entry->UserData;
+ pid = (HANDLE)((ULONG_PTR)Entry->ProcessId & ~0x1);
+ if ( pid == NtCurrentTeb()->ClientId.UniqueProcess &&
+ pRgn_Attr )
REGION_UnlockRgn(pRgn);
}
REGION_UnlockRgn(pRgn);
}
+/*
+ System Regions:
+ These regions do not use attribute sections and when allocated, use gdiobj
+ level functions.
+*/
+
BOOL INTERNAL_CALL
REGION_Cleanup(PVOID ObjectBody)
{
BOOL INTERNAL_CALL
REGION_Cleanup(PVOID ObjectBody)
{
VOID FASTCALL
IntGdiReleaseRaoRgn(PDC pDC)
{
VOID FASTCALL
IntGdiReleaseRaoRgn(PDC pDC)
{
RECTL_vSetEmptyRect(&pDC->erclClip);
}
RECTL_vSetEmptyRect(&pDC->erclClip);
}
VOID FASTCALL
IntGdiReleaseVisRgn(PDC pDC)
{
VOID FASTCALL
IntGdiReleaseVisRgn(PDC pDC)
{