From a4b76f805d6ca01fb65e10de38237afe2eb9750b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Thu, 5 Feb 2004 23:16:37 +0000 Subject: [PATCH] When using the parent clip region, translate it to child coordinates. Fixes bug #83. svn path=/trunk/; revision=8045 --- reactos/subsys/win32k/ntuser/windc.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/reactos/subsys/win32k/ntuser/windc.c b/reactos/subsys/win32k/ntuser/windc.c index a2a336fdc1e..10a72df9182 100644 --- a/reactos/subsys/win32k/ntuser/windc.c +++ b/reactos/subsys/win32k/ntuser/windc.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: windc.c,v 1.54 2004/02/04 22:59:04 gvg Exp $ +/* $Id: windc.c,v 1.55 2004/02/05 23:16:37 gvg Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -255,6 +255,18 @@ DceUpdateVisRgn(DCE *Dce, PWINDOW_OBJECT Window, ULONG Flags) } hRgnVisible = DceGetVisRgn(Parent->Self, DcxFlags, Window->Self, Flags); + if (0 == (Flags & DCX_WINDOW)) + { + NtGdiOffsetRgn(hRgnVisible, + Parent->ClientRect.left - Window->ClientRect.left, + Parent->ClientRect.top - Window->ClientRect.top); + } + else + { + NtGdiOffsetRgn(hRgnVisible, + Parent->WindowRect.left - Window->WindowRect.left, + Parent->WindowRect.top - Window->WindowRect.top); + } } else {