Author: jgardou
Date: Sun Jun 2 14:30:48 2013
New Revision: 59143
URL:
http://svn.reactos.org/svn/reactos?rev=59143&view=rev
Log:
[WIN32K]
- Fix ExtCreateRegion implementation
CORE-4600 #comment Fixed in r59143. Thanks Giannis for the hint. #resolve
Modified:
trunk/reactos/win32ss/gdi/ntgdi/region.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/region.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/region.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/region.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/region.c [iso-8859-1] Sun Jun 2 14:30:48 2013
@@ -3599,6 +3599,8 @@
DWORD nCount = 0;
DWORD iType = 0;
DWORD dwSize = 0;
+ UINT i;
+ RECT* rects;
NTSTATUS Status = STATUS_SUCCESS;
MATRIX matrix;
XFORMOBJ xo;
@@ -3610,6 +3612,7 @@
nCount = RgnData->rdh.nCount;
iType = RgnData->rdh.iType;
dwSize = RgnData->rdh.dwSize;
+ rects = (RECT*)RgnData->Buffer;
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
@@ -3641,6 +3644,11 @@
_SEH2_TRY
{
+ /* Insert the rectangles one by one */
+ for(i=0; i<nCount; i++)
+ {
+ REGION_UnionRectWithRgn(Region, &rects[i]);
+ }
if (Xform)
{
ULONG ret;
@@ -3656,20 +3664,13 @@
/* Apply the coordinate transformation on the rects */
if (XFORMOBJ_bApplyXform(&xo,
XF_LTOL,
- nCount * 2,
- RgnData->Buffer,
+ Region->rdh.nCount * 2,
+ Region->Buffer,
Region->Buffer))
{
Status = STATUS_SUCCESS;
}
}
- }
- else
- {
- /* Copy rect coordinates */
- RtlCopyMemory(Region->Buffer,
- RgnData->Buffer,
- nCount * sizeof(RECT));
}
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)