mirror of
https://github.com/reactos/reactos.git
synced 2025-06-03 08:20:27 +00:00
[Win32k]
- Implement IntGdiSetBrushOwner for bug 5124. svn path=/trunk/; revision=45170
This commit is contained in:
parent
2899820ed5
commit
d0d7c7c47f
4 changed files with 37 additions and 7 deletions
|
@ -132,4 +132,6 @@ PVOID FASTCALL AllocateObjectAttr(VOID);
|
||||||
|
|
||||||
VOID FASTCALL FreeObjectAttr(PVOID);
|
VOID FASTCALL FreeObjectAttr(PVOID);
|
||||||
|
|
||||||
|
BOOL FASTCALL IntGdiSetBrushOwner(PBRUSH,DWORD);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -82,9 +82,10 @@ PVOID INTERNAL_CALL GDI_MapHandleTable(PSECTION_OBJECT SectionObject, PEPROCES
|
||||||
#define GDIOBJFLAG_IGNOREPID (0x1)
|
#define GDIOBJFLAG_IGNOREPID (0x1)
|
||||||
#define GDIOBJFLAG_IGNORELOCK (0x2)
|
#define GDIOBJFLAG_IGNORELOCK (0x2)
|
||||||
|
|
||||||
BOOL FASTCALL GreDeleteObject(HGDIOBJ hObject);
|
BOOL FASTCALL GreDeleteObject(HGDIOBJ hObject);
|
||||||
BOOL FASTCALL IsObjectDead(HGDIOBJ);
|
BOOL FASTCALL IsObjectDead(HGDIOBJ);
|
||||||
BOOL FASTCALL IntGdiSetDCOwnerEx( HDC, DWORD, BOOL);
|
BOOL FASTCALL IntGdiSetDCOwnerEx( HDC, DWORD, BOOL);
|
||||||
|
BOOL FASTCALL IntGdiSetRegeionOwner(HRGN,DWORD);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Release GDI object. Every object locked by GDIOBJ_LockObj() must be unlocked.
|
* Release GDI object. Every object locked by GDIOBJ_LockObj() must be unlocked.
|
||||||
|
|
|
@ -195,8 +195,7 @@ IntAttachMonitor(IN PDEVOBJ *pGdiDevice,
|
||||||
Monitor->rcMonitor.right,
|
Monitor->rcMonitor.right,
|
||||||
Monitor->rcMonitor.bottom );
|
Monitor->rcMonitor.bottom );
|
||||||
|
|
||||||
// Replace with IntGdiSetRegeionOwner(Monitor->hrgnMonitor, GDI_OBJ_HMGR_PUBLIC);
|
IntGdiSetRegeionOwner(Monitor->hrgnMonitor, GDI_OBJ_HMGR_PUBLIC);
|
||||||
GDIOBJ_SetOwnership(Monitor->hrgnMonitor, NULL);
|
|
||||||
|
|
||||||
if (gMonitorList == NULL)
|
if (gMonitorList == NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1560,6 +1560,36 @@ GDI_MapHandleTable(PSECTION_OBJECT SectionObject, PEPROCESS Process)
|
||||||
|
|
||||||
/** PUBLIC FUNCTIONS **********************************************************/
|
/** 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
|
BOOL
|
||||||
FASTCALL
|
FASTCALL
|
||||||
IntGdiSetBrushOwner(PBRUSH pbr, DWORD OwnerMask)
|
IntGdiSetBrushOwner(PBRUSH pbr, DWORD OwnerMask)
|
||||||
|
@ -1609,7 +1639,6 @@ IntGdiSetBrushOwner(PBRUSH pbr, DWORD OwnerMask)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOL
|
BOOL
|
||||||
FASTCALL
|
FASTCALL
|
||||||
IntGdiSetDCOwnerEx( HDC hDC, DWORD OwnerMask, BOOL NoSetBrush)
|
IntGdiSetDCOwnerEx( HDC hDC, DWORD OwnerMask, BOOL NoSetBrush)
|
||||||
|
@ -1673,7 +1702,6 @@ GreGetObjectOwner(HGDIOBJ Handle, GDIOBJTYPE ObjType)
|
||||||
return Ret;
|
return Ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
W32KAPI
|
W32KAPI
|
||||||
HANDLE
|
HANDLE
|
||||||
APIENTRY
|
APIENTRY
|
||||||
|
|
Loading…
Reference in a new issue