From 052218fc23597a3280ed062cd6d53dc8010f40b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Sun, 4 Dec 2005 22:31:43 +0000 Subject: [PATCH] Limit invalidate region if required svn path=/trunk/; revision=19894 --- reactos/subsys/win32k/ntuser/painting.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/reactos/subsys/win32k/ntuser/painting.c b/reactos/subsys/win32k/ntuser/painting.c index 575dc4e2135..524f39c41b3 100644 --- a/reactos/subsys/win32k/ntuser/painting.c +++ b/reactos/subsys/win32k/ntuser/painting.c @@ -319,6 +319,19 @@ IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags) BOOL HadPaintMessage, HadNCPaintMessage; BOOL HasPaintMessage, HasNCPaintMessage; + /* + * If the nonclient is not to be redrawn, clip the region to the client + * rect + */ + if (0 != (Flags & RDW_INVALIDATE) && 0 == (Flags & RDW_FRAME)) + { + HRGN hRgnClient; + + hRgnClient = UnsafeIntCreateRectRgnIndirect(&Window->ClientRect); + RgnType = NtGdiCombineRgn(hRgn, hRgn, hRgnClient, RGN_AND); + NtGdiDeleteObject(hRgnClient); + } + /* * Clip the given region with window rectangle (or region) */