Index: win32ss/gdi/ntgdi/cliprgn.c =================================================================== --- win32ss/gdi/ntgdi/cliprgn.c (revision 76027) +++ win32ss/gdi/ntgdi/cliprgn.c (working copy) @@ -70,6 +70,9 @@ PREGION prgn, int fnMode) { + int ret; + RECTL rect1, rect2; + if (fnMode == RGN_COPY) { if (!prgn) @@ -88,7 +91,18 @@ dc->fs |= DC_FLAG_DIRTY_RAO; - return IntGdiCombineRgn(dc->dclevel.prgnClip, prgn, NULL, RGN_COPY); + ret = IntGdiCombineRgn(dc->dclevel.prgnClip, prgn, NULL, RGN_COPY); + + if (dc->prgnVis) + { + REGION_GetRgnBox(dc->prgnVis, &rect1); + REGION_GetRgnBox(dc->dclevel.prgnClip, &rect2); + + if (!RECTL_bIntersectRect(&rect1, &rect1, &rect2)) + ret = NULLREGION; + } + + return ret; } ASSERT(prgn != NULL); @@ -103,7 +117,18 @@ dc->fs |= DC_FLAG_DIRTY_RAO; - return IntGdiCombineRgn(dc->dclevel.prgnClip, dc->dclevel.prgnClip, prgn, fnMode); + ret = IntGdiCombineRgn(dc->dclevel.prgnClip, dc->dclevel.prgnClip, prgn, fnMode); + + if (dc->prgnVis) + { + REGION_GetRgnBox(dc->prgnVis, &rect1); + REGION_GetRgnBox(dc->dclevel.prgnClip, &rect2); + + if (!RECTL_bIntersectRect(&rect1, &rect1, &rect2)) + ret = NULLREGION; + } + + return ret; }