[ros-diffs] [jgardou] 48665: [WIN32K] - Create the visible region upon DC initilization propely. This is a leftover from 48579 and 48660.

jgardou at svn.reactos.org jgardou at svn.reactos.org
Tue Aug 31 16:02:25 UTC 2010


Author: jgardou
Date: Tue Aug 31 16:02:22 2010
New Revision: 48665

URL: http://svn.reactos.org/svn/reactos?rev=48665&view=rev
Log:
[WIN32K]
  - Create the visible region upon DC initilization propely.
This is a leftover from 48579 and 48660.

Modified:
    branches/reactos-yarotows/subsystems/win32/win32k/objects/dclife.c

Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/dclife.c
URL: http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win32/win32k/objects/dclife.c?rev=48665&r1=48664&r2=48665&view=diff
==============================================================================
--- branches/reactos-yarotows/subsystems/win32/win32k/objects/dclife.c [iso-8859-1] (original)
+++ branches/reactos-yarotows/subsystems/win32/win32k/objects/dclife.c [iso-8859-1] Tue Aug 31 16:02:22 2010
@@ -89,8 +89,6 @@
 void
 DC_InitHack(PDC pdc)
 {
-    HRGN hVisRgn;
-
     TextIntRealizeFont(pdc->pdcattr->hlfntNew,NULL);
     pdc->pdcattr->iCS_CP = ftGdiGetTextCharsetInfo(pdc,NULL,0);
 
@@ -98,14 +96,8 @@
     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 @@
 
     /* 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];




More information about the Ros-diffs mailing list