Author: jgardou
Date: Mon Apr 19 01:15:02 2010
New Revision: 46930
URL:
http://svn.reactos.org/svn/reactos?rev=46930&view=rev
Log:
[WIN32K]
- Do not create a PDEVOBJ for nothing at startup
- Create the surface for real in IntCreatePrimarySurface
Modified:
branches/reactos-yarotows/subsystems/win32/win32k/ntuser/metric.c
branches/reactos-yarotows/subsystems/win32/win32k/objects/cliprgn.c
branches/reactos-yarotows/subsystems/win32/win32k/objects/device.c
Modified: branches/reactos-yarotows/subsystems/win32/win32k/ntuser/metric.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
==============================================================================
--- branches/reactos-yarotows/subsystems/win32/win32k/ntuser/metric.c [iso-8859-1]
(original)
+++ branches/reactos-yarotows/subsystems/win32/win32k/ntuser/metric.c [iso-8859-1] Mon Apr
19 01:15:02 2010
@@ -24,22 +24,18 @@
InitMetrics(VOID)
{
INT *piSysMet;
- PPDEVOBJ ppdev;
ULONG Width, Height;
/* FIXME: HACK, due to missing PDEV on first init */
- ppdev = EngpGetPDEV(NULL);
-
- if (!ppdev)
+ if (!pPrimarySurface)
{
Width = 640;
Height = 480;
}
else
{
- Width = ppdev->gdiinfo.ulHorzRes;
- Height = ppdev->gdiinfo.ulVertRes;
- PDEVOBJ_vRelease(ppdev);
+ Width = pPrimarySurface->gdiinfo.ulHorzRes;
+ Height = pPrimarySurface->gdiinfo.ulVertRes;
}
piSysMet = gpsi->aiSysMet;
Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/cliprgn.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
==============================================================================
--- branches/reactos-yarotows/subsystems/win32/win32k/objects/cliprgn.c [iso-8859-1]
(original)
+++ branches/reactos-yarotows/subsystems/win32/win32k/objects/cliprgn.c [iso-8859-1] Mon
Apr 19 01:15:02 2010
@@ -45,7 +45,7 @@
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 // FYI: Vis == NULL! source of "IntGdiCombineRgn requires hSrc2 != NULL for
combine mode 1!"
NtGdiCombineRgn(Dc->rosdc.hGCClipRgn, Dc->rosdc.hClipRgn, hRgnVis, RGN_AND);
NtGdiOffsetRgn(Dc->rosdc.hGCClipRgn, Dc->ptlDCOrig.x, Dc->ptlDCOrig.y);
Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/device.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
==============================================================================
--- branches/reactos-yarotows/subsystems/win32/win32k/objects/device.c [iso-8859-1]
(original)
+++ branches/reactos-yarotows/subsystems/win32/win32k/objects/device.c [iso-8859-1] Mon
Apr 19 01:15:02 2010
@@ -41,10 +41,11 @@
/* attach monitor */
IntAttachMonitor(gppdevPrimary, 0);
-DPRINT1("IntCreatePrimarySurface, pPrimarySurface=%p, pPrimarySurface->pSurface =
%p\n",
+ DPRINT1("IntCreatePrimarySurface, pPrimarySurface=%p,
pPrimarySurface->pSurface = %p\n",
pPrimarySurface, pPrimarySurface->pSurface);
- pso = &pPrimarySurface->pSurface->SurfObj;
+ /* Create surface */
+ pso = &PDEVOBJ_pSurface(pPrimarySurface)->SurfObj;
SurfSize = pso->sizlBitmap;
/* Put the pointer in the center of the screen */