mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 14:03:02 +00:00
don't pass NULL handles to NtGdiCombineRgn
svn path=/trunk/; revision=13640
This commit is contained in:
parent
5239de8ad5
commit
99f3640c17
2 changed files with 23 additions and 11 deletions
|
@ -309,19 +309,20 @@ IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags)
|
||||||
-Window->WindowRect.top);
|
-Window->WindowRect.top);
|
||||||
|
|
||||||
hRgnNonClient = NtGdiCreateRectRgn(0, 0, 0, 0);
|
hRgnNonClient = NtGdiCreateRectRgn(0, 0, 0, 0);
|
||||||
GDIOBJ_SetOwnership(hRgnNonClient, NULL);
|
|
||||||
if (NtGdiCombineRgn(hRgnNonClient, Window->UpdateRegion,
|
if (NtGdiCombineRgn(hRgnNonClient, Window->UpdateRegion,
|
||||||
hRgnWindow, RGN_DIFF) == NULLREGION)
|
hRgnWindow, RGN_DIFF) == NULLREGION)
|
||||||
{
|
{
|
||||||
GDIOBJ_SetOwnership(hRgnNonClient, PsGetCurrentProcess());
|
|
||||||
NtGdiDeleteObject(hRgnNonClient);
|
NtGdiDeleteObject(hRgnNonClient);
|
||||||
hRgnNonClient = NULL;
|
hRgnNonClient = NULL;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GDIOBJ_SetOwnership(hRgnNonClient, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Remove the nonclient region from the standard update region.
|
* Remove the nonclient region from the standard update region.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (NtGdiCombineRgn(Window->UpdateRegion, Window->UpdateRegion,
|
if (NtGdiCombineRgn(Window->UpdateRegion, Window->UpdateRegion,
|
||||||
hRgnWindow, RGN_AND) == NULLREGION)
|
hRgnWindow, RGN_AND) == NULLREGION)
|
||||||
{
|
{
|
||||||
|
@ -336,12 +337,12 @@ IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
NtGdiCombineRgn(Window->NCUpdateRegion, Window->NCUpdateRegion,
|
if(NULL != hRgnNonClient)
|
||||||
hRgnNonClient, RGN_OR);
|
|
||||||
if (NULL != hRgnNonClient)
|
|
||||||
{
|
{
|
||||||
GDIOBJ_SetOwnership(hRgnNonClient, PsGetCurrentProcess());
|
NtGdiCombineRgn(Window->NCUpdateRegion, Window->NCUpdateRegion,
|
||||||
NtGdiDeleteObject(hRgnNonClient);
|
hRgnNonClient, RGN_OR);
|
||||||
|
GDIOBJ_SetOwnership(hRgnNonClient, PsGetCurrentProcess());
|
||||||
|
NtGdiDeleteObject(hRgnNonClient);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -213,7 +213,7 @@ DceDeleteClipRgn(DCE* Dce)
|
||||||
{
|
{
|
||||||
Dce->DCXFlags &= ~DCX_KEEPCLIPRGN;
|
Dce->DCXFlags &= ~DCX_KEEPCLIPRGN;
|
||||||
}
|
}
|
||||||
else if (Dce->hClipRgn > (HRGN) 1)
|
else if (Dce->hClipRgn != NULL)
|
||||||
{
|
{
|
||||||
GDIOBJ_SetOwnership(Dce->hClipRgn, PsGetCurrentProcess());
|
GDIOBJ_SetOwnership(Dce->hClipRgn, PsGetCurrentProcess());
|
||||||
NtGdiDeleteObject(Dce->hClipRgn);
|
NtGdiDeleteObject(Dce->hClipRgn);
|
||||||
|
@ -332,10 +332,21 @@ DceUpdateVisRgn(DCE *Dce, PWINDOW_OBJECT Window, ULONG Flags)
|
||||||
noparent:
|
noparent:
|
||||||
if (Flags & DCX_INTERSECTRGN)
|
if (Flags & DCX_INTERSECTRGN)
|
||||||
{
|
{
|
||||||
NtGdiCombineRgn(hRgnVisible, hRgnVisible, Dce->hClipRgn, RGN_AND);
|
if(Dce->hClipRgn != NULL)
|
||||||
|
{
|
||||||
|
NtGdiCombineRgn(hRgnVisible, hRgnVisible, Dce->hClipRgn, RGN_AND);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(hRgnVisible != NULL)
|
||||||
|
{
|
||||||
|
NtGdiDeleteObject(hRgnVisible);
|
||||||
|
}
|
||||||
|
hRgnVisible = NtGdiCreateRectRgn(0, 0, 0, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Flags & DCX_EXCLUDERGN)
|
if (Flags & DCX_EXCLUDERGN && Dce->hClipRgn != NULL)
|
||||||
{
|
{
|
||||||
NtGdiCombineRgn(hRgnVisible, hRgnVisible, Dce->hClipRgn, RGN_DIFF);
|
NtGdiCombineRgn(hRgnVisible, hRgnVisible, Dce->hClipRgn, RGN_DIFF);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue