- if (visRgn->rdh.nCount > 0)
- {
- ClipObj = IntEngCreateClipRegion(visRgn->rdh.nCount, visRgn->Buffer,
- &visRgn->rdh.rcBound);
- DPRINT("Created visible region with %lu rects\n", visRgn->rdh.nCount);
- DPRINT(" BoundingRect: %d, %d %d, %d\n",
- visRgn->rdh.rcBound.left, visRgn->rdh.rcBound.top,
- visRgn->rdh.rcBound.right, visRgn->rdh.rcBound.bottom);
+ NtGdiOffsetRgn(hVisRgn, Window->rcClient.left, Window->rcClient.top);
+ visRgn = RGNOBJAPI_Lock(hVisRgn, NULL);
+ if (visRgn != NULL)
+ {
+ if (visRgn->rdh.nCount > 0)
+ {
+ ClipObj = IntEngCreateClipRegion(visRgn->rdh.nCount, visRgn->Buffer,
+ &visRgn->rdh.rcBound);
+ DPRINT("Created visible region with %lu rects\n", visRgn->rdh.nCount);
+ DPRINT(" BoundingRect: %d, %d %d, %d\n",
+ visRgn->rdh.rcBound.left, visRgn->rdh.rcBound.top,
+ visRgn->rdh.rcBound.right, visRgn->rdh.rcBound.bottom);
+ {
+ ULONG i;
+ for (i = 0; i < visRgn->rdh.nCount; i++)
+ {
+ DPRINT(" Rect #%lu: %ld,%ld %ld,%ld\n", i+1,
+ visRgn->Buffer[i].left, visRgn->Buffer[i].top,
+ visRgn->Buffer[i].right, visRgn->Buffer[i].bottom);
+ }
+ }
+ }
+ RGNOBJAPI_Unlock(visRgn);
+ }
+ else