Author: tkreuzer
Date: Sat Sep 27 22:59:13 2014
New Revision: 64359
URL:
http://svn.reactos.org/svn/reactos?rev=64359&view=rev
Log:
[WIN32K]
Fix NtGdiExcludeClipRect. Should fix regressions from r64260.
Modified:
trunk/reactos/win32ss/gdi/ntgdi/cliprgn.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/cliprgn.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/cliprgn.…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/cliprgn.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/cliprgn.c [iso-8859-1] Sat Sep 27 22:59:13 2014
@@ -226,34 +226,27 @@
iComplexity = REGION_SubtractRectFromRgn(pdc->dclevel.prgnClip,
pdc->dclevel.prgnClip,
&rect);
-
- /* Emulate Windows behavior */
- if (iComplexity == SIMPLEREGION)
- iComplexity = COMPLEXREGION;
- }
- else
- {
- /* Check if the rect intersects with the window rect */
- if (RECTL_bIntersectRect(&rect, &rect, &pdc->erclWindow))
- {
- /* It does. In this case create an empty region */
- pdc->dclevel.prgnClip = IntSysCreateRectpRgn(0, 0, 0, 0);
- iComplexity = NULLREGION;
+ }
+ else
+ {
+ /* We don't have a clip region yet, create an empty region */
+ pdc->dclevel.prgnClip = IntSysCreateRectpRgn(0, 0, 0, 0);
+ if (pdc->dclevel.prgnClip == NULL)
+ {
+ iComplexity = ERROR;
}
else
{
- /* Otherwise, emulate strange Windows behavior... */
- pdc->dclevel.prgnClip = IntSysCreateRectpRgn(0, 0, 1, 1);
- iComplexity = COMPLEXREGION;
- }
-
- /* Check if creating the region failed */
- if (pdc->dclevel.prgnClip == NULL)
- {
- /* Return error code */
- iComplexity = ERROR;
- }
- }
+ /* Subtract the rect from the VIS region */
+ iComplexity = REGION_SubtractRectFromRgn(pdc->dclevel.prgnClip,
+ pdc->prgnVis,
+ &rect);
+ }
+ }
+
+ /* Emulate Windows behavior */
+ if (iComplexity == SIMPLEREGION)
+ iComplexity = COMPLEXREGION;
/* If we succeeded, mark the RAO region as dirty */
if (iComplexity != ERROR)