From 14f190d1d4b85e1eabe46c3ece075debd31364cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Wed, 3 Dec 2003 08:19:03 +0000 Subject: [PATCH] Handle ClipRegion == 1 as a special case in NtUserGetDCEx() svn path=/trunk/; revision=6851 --- reactos/subsys/win32k/ntuser/windc.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/reactos/subsys/win32k/ntuser/windc.c b/reactos/subsys/win32k/ntuser/windc.c index 5fa1bcc073b..2c667659fd6 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.40 2003/12/02 19:58:54 navaraf Exp $ +/* $Id: windc.c,v 1.41 2003/12/03 08:19:03 gvg Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -440,28 +440,24 @@ NtUserGetDCEx(HWND hWnd, HANDLE ClipRegion, ULONG Flags) Flags |= DCX_INTERSECTRGN; } -/* - if (ClipRegion == (HRGN)1) + if (ClipRegion == (HRGN) 1) { if (!(Flags & DCX_WINDOW)) { - ClipRegion = UnsafeIntCreateRectRgnIndirect(&Window->ClientRect); + Dce->hClipRgn = UnsafeIntCreateRectRgnIndirect(&Window->ClientRect); } else { - ClipRegion = UnsafeIntCreateRectRgnIndirect(&Window->WindowRect); + Dce->hClipRgn = UnsafeIntCreateRectRgnIndirect(&Window->WindowRect); } - NtGdiOffsetRgn(ClipRegion, - -Window->WindowRect.left, - -Window->WindowRect.top); } -*/ - - if (NULL != ClipRegion) + else if (NULL != ClipRegion) { Dce->hClipRgn = NtGdiCreateRectRgn(0, 0, 0, 0); - if(Dce->hClipRgn) - NtGdiCombineRgn(Dce->hClipRgn, ClipRegion, NULL, RGN_COPY); + if (Dce->hClipRgn) + { + NtGdiCombineRgn(Dce->hClipRgn, ClipRegion, NULL, RGN_COPY); + } NtGdiDeleteObject(ClipRegion); }