#define GDIOBJFLAG_IGNOREPID (0x1)
#define GDIOBJFLAG_IGNORELOCK (0x2)
-BOOL FASTCALL GreDeleteObject(HGDIOBJ hObject);
-BOOL FASTCALL IsObjectDead(HGDIOBJ);
-BOOL FASTCALL IntGdiSetDCOwnerEx( HDC, DWORD, BOOL);
+BOOL FASTCALL GreDeleteObject(HGDIOBJ hObject);
+BOOL FASTCALL IsObjectDead(HGDIOBJ);
+BOOL FASTCALL IntGdiSetDCOwnerEx( HDC, DWORD, BOOL);
+BOOL FASTCALL IntGdiSetRegeionOwner(HRGN,DWORD);
/*!
* Release GDI object. Every object locked by GDIOBJ_LockObj() must be unlocked.
Monitor->rcMonitor.right,
Monitor->rcMonitor.bottom );
- // Replace with IntGdiSetRegeionOwner(Monitor->hrgnMonitor, GDI_OBJ_HMGR_PUBLIC);
- GDIOBJ_SetOwnership(Monitor->hrgnMonitor, NULL);
+ IntGdiSetRegeionOwner(Monitor->hrgnMonitor, GDI_OBJ_HMGR_PUBLIC);
if (gMonitorList == NULL)
{
/** PUBLIC FUNCTIONS **********************************************************/
+BOOL
+FASTCALL
+IntGdiSetRegeionOwner(HRGN hRgn, DWORD OwnerMask)
+{
+ INT Index;
+ PGDI_TABLE_ENTRY Entry;
+/*
+ System Regions:
+ These regions do not use attribute sections and when allocated, use gdiobj
+ level functions.
+ */
+ // FIXME! HAX!!! Remove this once we get everything right!
+ KeEnterCriticalRegion();
+ Index = GDI_HANDLE_GET_INDEX(hRgn);
+ Entry = &GdiHandleTable->Entries[Index];
+ if (Entry->UserData) FreeObjectAttr(Entry->UserData);
+ Entry->UserData = NULL;
+ KeLeaveCriticalRegion();
+ //
+ if ((OwnerMask == GDI_OBJ_HMGR_PUBLIC) || OwnerMask == GDI_OBJ_HMGR_NONE)
+ {
+ return GDIOBJ_SetOwnership(hRgn, NULL);
+ }
+ if (OwnerMask == GDI_OBJ_HMGR_POWNED)
+ {
+ return GDIOBJ_SetOwnership((HGDIOBJ) hRgn, PsGetCurrentProcess() );
+ }
+ return FALSE;
+}
+
BOOL
FASTCALL
IntGdiSetBrushOwner(PBRUSH pbr, DWORD OwnerMask)
return TRUE;
}
-
BOOL
FASTCALL
IntGdiSetDCOwnerEx( HDC hDC, DWORD OwnerMask, BOOL NoSetBrush)
return Ret;
}
-
W32KAPI
HANDLE
APIENTRY