Author: jgardou
Date: Mon Apr 26 23:49:09 2010
New Revision: 47044
URL:
http://svn.reactos.org/svn/reactos?rev=47044&view=rev
Log:
[GDI32]
- Use device string when given one in IntCreateDIC
[WIN32K]
- Exchange pdevmode when excahnging PDEVOBJ pointers
- Update Globals gdi devcaps when switching mode if ppdev is the primary surface
Modified:
branches/reactos-yarotows/dll/win32/gdi32/objects/dc.c
branches/reactos-yarotows/subsystems/win32/win32k/eng/pdevobj.c
Modified: branches/reactos-yarotows/dll/win32/gdi32/objects/dc.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/dll/win32/gdi3…
==============================================================================
--- branches/reactos-yarotows/dll/win32/gdi32/objects/dc.c [iso-8859-1] (original)
+++ branches/reactos-yarotows/dll/win32/gdi32/objects/dc.c [iso-8859-1] Mon Apr 26
23:49:09 2010
@@ -15,7 +15,7 @@
{
UNICODE_STRING Device, Output;
HDC hDC = NULL;
- BOOL Display = FALSE, Default = TRUE;
+ BOOL Display = FALSE, Default = FALSE;
ULONG UMdhpdev = 0;
HANDLE hspool = NULL;
@@ -31,7 +31,7 @@
if ((!lpwszDevice) && (!lpwszDriver))
{
- Default = FALSE; // Ask Win32k to set Default device.
+ Default = TRUE; // Ask Win32k to set Default device.
Display = TRUE; // Most likely to be DISPLAY.
}
else
@@ -318,7 +318,7 @@
DeleteObject(HGDIOBJ hObject)
{
UINT Type = 0;
-
+
/* From Wine: DeleteObject does not SetLastError() on a null object */
if(!hObject) return FALSE;
@@ -332,7 +332,7 @@
Type = GDI_HANDLE_GET_TYPE(hObject);
- if ((Type == GDI_OBJECT_TYPE_METAFILE) ||
+ if ((Type == GDI_OBJECT_TYPE_METAFILE) ||
(Type == GDI_OBJECT_TYPE_ENHMETAFILE))
return FALSE;
@@ -348,7 +348,7 @@
case GDI_OBJECT_TYPE_METADC:
return MFDRV_DeleteObject( hObject );
case GDI_OBJECT_TYPE_EMF:
- {
+ {
PLDC pLDC = GdiGetLDC(hObject);
if ( !pLDC ) return FALSE;
return EMFDRV_DeleteObject( hObject );
@@ -533,7 +533,7 @@
return NtGdiGetDeviceCaps(hDC,i);
}
DPRINT("Device CAPS2\n");
-
+
switch (i)
{
case DRIVERVERSION:
@@ -1608,7 +1608,7 @@
#if 0
case GDI_OBJECT_TYPE_METADC:
- return MFDRV_SelectObject( hDC, hGdiObj);
+ return MFDRV_SelectObject( hDC, hGdiObj);
case GDI_OBJECT_TYPE_EMF:
PLDC pLDC = GdiGetLDC(hDC);
if ( !pLDC ) return NULL;
Modified: branches/reactos-yarotows/subsystems/win32/win32k/eng/pdevobj.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
==============================================================================
--- branches/reactos-yarotows/subsystems/win32/win32k/eng/pdevobj.c [iso-8859-1]
(original)
+++ branches/reactos-yarotows/subsystems/win32/win32k/eng/pdevobj.c [iso-8859-1] Mon Apr
26 23:49:09 2010
@@ -321,6 +321,10 @@
ppdev->gdiinfo = ppdev2->gdiinfo;
ppdev2->gdiinfo = pdevTmp.gdiinfo;
+ /* Exchange DEVMODE */
+ ppdev->pdmwDev = ppdev2->pdmwDev;
+ ppdev2->pdmwDev = pdevTmp.pdmwDev ;
+
/* Notify each driver instance of its new HDEV association */
ppdev->pfn.CompletePDEV(ppdev->dhpdev, (HDEV)ppdev);
ppdev2->pfn.CompletePDEV(ppdev2->dhpdev, (HDEV)ppdev2);
@@ -382,6 +386,12 @@
/* 8. Disable DirectDraw */
PDEVOBJ_vRelease(ppdevTmp);
+
+ /* Update primary display capabilities */
+ if(ppdev == gppdevPrimary)
+ {
+ PDEVOBJ_vGetDeviceCaps(ppdev, &GdiHandleTable->DevCaps);
+ }
/* Success! */
retval = TRUE;