From: Jérôme Gardou Date: Sun, 18 Apr 2010 23:15:02 +0000 (+0000) Subject: [WIN32K] X-Git-Tag: backups/reactos-yarotows@57446~169 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=18f210877bd83fcd3c0793d81e60da9f8f0cffe3;hp=1e00973f21996701b95d620be22468a541b25799 [WIN32K] - Do not create a PDEVOBJ for nothing at startup - Create the surface for real in IntCreatePrimarySurface svn path=/branches/reactos-yarotows/; revision=46930 --- diff --git a/subsystems/win32/win32k/ntuser/metric.c b/subsystems/win32/win32k/ntuser/metric.c index a66aa2920fe..b2bd665e613 100644 --- a/subsystems/win32/win32k/ntuser/metric.c +++ b/subsystems/win32/win32k/ntuser/metric.c @@ -24,22 +24,18 @@ FASTCALL 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; diff --git a/subsystems/win32/win32k/objects/cliprgn.c b/subsystems/win32/win32k/objects/cliprgn.c index 09a237ee542..41a32eed519 100644 --- a/subsystems/win32/win32k/objects/cliprgn.c +++ b/subsystems/win32/win32k/objects/cliprgn.c @@ -45,7 +45,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 // 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); diff --git a/subsystems/win32/win32k/objects/device.c b/subsystems/win32/win32k/objects/device.c index a35bc715992..4d927538366 100644 --- a/subsystems/win32/win32k/objects/device.c +++ b/subsystems/win32/win32k/objects/device.c @@ -41,10 +41,11 @@ IntCreatePrimarySurface() /* 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 */