From 24475b126e47640f0d496fd837aa7a13acd61660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Fri, 18 Jul 2003 20:55:21 +0000 Subject: [PATCH] Only repaint those parts of the desktop window which need repainting svn path=/trunk/; revision=5159 --- reactos/subsys/win32k/ntuser/vis.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/reactos/subsys/win32k/ntuser/vis.c b/reactos/subsys/win32k/ntuser/vis.c index 8c704a68e57..9641dfafcbc 100644 --- a/reactos/subsys/win32k/ntuser/vis.c +++ b/reactos/subsys/win32k/ntuser/vis.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: vis.c,v 1.1 2003/07/17 07:49:15 gvg Exp $ + * $Id: vis.c,v 1.2 2003/07/18 20:55:21 gvg Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -198,6 +198,7 @@ VIS_ComputeVisibleRegion(PDESKTOP_OBJECT Desktop, PWINDOW_OBJECT Window, return VisRgn; } +/* FIXME: to be replaced by a normal window proc in CSRSS */ VOID STATIC FASTCALL VIS_RepaintDesktop(HWND Desktop, HRGN RepaintRgn) { @@ -211,13 +212,14 @@ VIS_RepaintDesktop(HWND Desktop, HRGN RepaintRgn) VOID FASTCALL VIS_WindowLayoutChanged(PDESKTOP_OBJECT Desktop, PWINDOW_OBJECT Window, - HRGN UncoveredRgn) + HRGN NewlyExposed) { PWINDOW_OBJECT DesktopWindow; PWINDOW_OBJECT Child; PLIST_ENTRY CurrentEntry; HRGN Uncovered; HRGN Covered; + HRGN Repaint; DesktopWindow = W32kGetWindowObject(Desktop->DesktopWindow); Uncovered = UnsafeW32kCreateRectRgnIndirect(&DesktopWindow->WindowRect); @@ -236,7 +238,12 @@ VIS_WindowLayoutChanged(PDESKTOP_OBJECT Desktop, PWINDOW_OBJECT Window, CurrentEntry = CurrentEntry->Flink; } ExReleaseFastMutexUnsafe(&DesktopWindow->ChildrenListLock); - VIS_RepaintDesktop(DesktopWindow->Self, Uncovered); + + Repaint = W32kCreateRectRgn(0, 0, 0, 0); + W32kCombineRgn(Repaint, NewlyExposed, Uncovered, RGN_AND); + VIS_RepaintDesktop(DesktopWindow->Self, Repaint); + W32kDeleteObject(Repaint); + W32kDeleteObject(Uncovered); }