[NTUSER] Clip the non-client update region to the dirty region (#9126)

Remove the excessive repainting of the non-client window area (title caption/buttons and borders) whenever other windows are being dragged over.

CORE-5877, CORE-16672
This commit is contained in:
Ahmed Arif
2026-06-28 20:24:50 +02:00
committed by GitHub
parent 24e904e095
commit b38db9dd23

View File

@@ -285,9 +285,11 @@ IntGetNCUpdateRgn(PWND Window, BOOL Validate)
return HRGN_WINDOW;
}
NcType = IntGdiGetRgnBox(hRgnNonClient, &update);
NcType = IntGdiGetRgnBox(Window->hrgnUpdate, &update);
RgnType = NtGdiCombineRgn(hRgnNonClient, hRgnNonClient, hRgnWindow, RGN_DIFF);
if ((RgnType != ERROR) && (RgnType != NULLREGION))
RgnType = NtGdiCombineRgn(hRgnNonClient, hRgnNonClient, Window->hrgnUpdate, RGN_AND);
if (RgnType == ERROR)
{