On 2016-12-22 11:39, jimtabor(a)svn.reactos.org wrote:
+#ifndef _WIN32K_ ///// Fix CORE-2201.
+ if (!(flags & DT_NOCLIP) )
+ {
+ int hasClip;
+ hrgn = CreateRectRgn(0,0,0,0);
+ if (hrgn)
+ {
+ hasClip = GetClipRgn(hdc, hrgn);
+ // If the region to be retrieved is NULL, the return value is 0.
+ if (hasClip != 1)
+ {
+ DeleteObject(hrgn);
+ hrgn = NULL;
+ }
+ IntersectClipRect(hdc, rect->left, rect->top, rect->right,
rect->bottom);
+ }
+ }
+#else
+ if (!(flags & DT_NOCLIP) )
+ {
+ int hasClip;
+ hrgn = NtGdiCreateRectRgn(0,0,0,0);
+ if (hrgn)
+ {
+ hasClip = NtGdiGetRandomRgn(hdc, hrgn, CLIPRGN);
+ if (hasClip != 1)
+ {
+ GreDeleteObject(hrgn);
+ hrgn = NULL;
+ }
+ NtGdiIntersectClipRect(hdc, rect->left, rect->top, rect->right,
rect->bottom);
+ }
+ }
+#endif /////
Any particular reason not to simply do the NtGdi call in both user
and kernel? Looks like they should be doing the exact same thing.