From 5ba0a60862d3d0be7a7b46dbd9d54da6e9fddba2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Gardou?= Date: Tue, 31 Aug 2010 16:02:22 +0000 Subject: [PATCH] [WIN32K] - Create the visible region upon DC initilization propely. This is a leftover from 48579 and 48660. svn path=/branches/reactos-yarotows/; revision=48665 --- subsystems/win32/win32k/objects/dclife.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/subsystems/win32/win32k/objects/dclife.c b/subsystems/win32/win32k/objects/dclife.c index ee8396ff297..75113441b85 100644 --- a/subsystems/win32/win32k/objects/dclife.c +++ b/subsystems/win32/win32k/objects/dclife.c @@ -89,8 +89,6 @@ DC_AllocDcWithHandle() void DC_InitHack(PDC pdc) { - HRGN hVisRgn; - TextIntRealizeFont(pdc->pdcattr->hlfntNew,NULL); pdc->pdcattr->iCS_CP = ftGdiGetTextCharsetInfo(pdc,NULL,0); @@ -98,14 +96,8 @@ DC_InitHack(PDC pdc) ASSERT(pdc->dclevel.ppal); /* Select regions */ - // FIXME: too complicated, broken error handling pdc->rosdc.hClipRgn = NULL; pdc->rosdc.hGCClipRgn = NULL; - hVisRgn = NtGdiCreateRectRgn(0, 0, pdc->dclevel.sizl.cx, pdc->dclevel.sizl.cy); - ASSERT(hVisRgn); - GdiSelectVisRgn(pdc->BaseObject.hHmgr, hVisRgn); - GreDeleteObject(hVisRgn); - ASSERT(pdc->prgnVis); } VOID @@ -234,8 +226,11 @@ DC_vInitDc( /* Setup regions */ pdc->prgnAPI = NULL; - pdc->prgnVis = NULL; // FIXME - pdc->prgnRao = NULL; + pdc->prgnRao = NULL; + /* Allocate a Vis region */ + pdc->prgnVis = IntSysCreateRectpRgn(0, 0, pdc->dclevel.sizl.cx, pdc->dclevel.sizl.cy); + ASSERT(pdc->prgnVis); + GDIOBJ_CopyOwnership(pdc->BaseObject.hHmgr, pdc->prgnVis->BaseObject.hHmgr); /* Setup palette */ pdc->dclevel.hpal = StockObjects[DEFAULT_PALETTE]; -- 2.17.1