From 1954fd59da8565c58e8900cecddb9eaac325dac7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Gardou?= Date: Wed, 14 Jul 2010 16:12:32 +0000 Subject: [PATCH] [WIN32K] - Properly initialize hVisRgn in CLIPPING_UpdateGCRegion This fixes a whole bunch of "IntGdiCombineRgn requires hSrc2 != NULL for combine mode 1!", and probably some bugs. Dedicated to encod3d. svn path=/trunk/; revision=48042 --- reactos/subsystems/win32/win32k/objects/cliprgn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/subsystems/win32/win32k/objects/cliprgn.c b/reactos/subsystems/win32/win32k/objects/cliprgn.c index ea88cf3047c..7bfcf807fbe 100644 --- a/reactos/subsystems/win32/win32k/objects/cliprgn.c +++ b/reactos/subsystems/win32/win32k/objects/cliprgn.c @@ -26,7 +26,7 @@ int FASTCALL CLIPPING_UpdateGCRegion(DC* Dc) { PROSRGNDATA CombinedRegion; - HRGN hRgnVis = NULL; + HRGN hRgnVis = Dc->prgnVis->BaseObject.hHmgr; /* Experiment with API region based on wine.. */ if (Dc->rosdc.hClipRgn && Dc->dclevel.prgnMeta) @@ -56,7 +56,7 @@ CLIPPING_UpdateGCRegion(DC* Dc) Dc->rosdc.hGCClipRgn = IntSysCreateRectRgn(0, 0, 0, 0); if (Dc->rosdc.hClipRgn == NULL) - NtGdiCombineRgn(Dc->rosdc.hGCClipRgn, ((PROSRGNDATA)Dc->prgnVis)->BaseObject.hHmgr, 0, RGN_COPY); + NtGdiCombineRgn(Dc->rosdc.hGCClipRgn, hRgnVis, 0, RGN_COPY); else NtGdiCombineRgn(Dc->rosdc.hGCClipRgn, Dc->rosdc.hClipRgn, hRgnVis, RGN_AND); -- 2.17.1