gdi32: Reset the visible region in ResetDC.
This commit is contained in:
parent
e4beddb664
commit
c73e2d5e02
|
@ -859,7 +859,17 @@ HDC WINAPI ResetDCW( HDC hdc, const DEVMODEW *devmode )
|
|||
|
||||
if ((dc = get_dc_ptr( hdc )))
|
||||
{
|
||||
if (dc->funcs->pResetDC) ret = dc->funcs->pResetDC( dc->physDev, devmode );
|
||||
if (dc->funcs->pResetDC)
|
||||
{
|
||||
ret = dc->funcs->pResetDC( dc->physDev, devmode );
|
||||
if (ret) /* reset the visible region */
|
||||
{
|
||||
dc->dirty = 0;
|
||||
SetRectRgn( dc->hVisRgn, 0, 0, GetDeviceCaps( hdc, DESKTOPHORZRES ),
|
||||
GetDeviceCaps( hdc, DESKTOPVERTRES ) );
|
||||
CLIPPING_UpdateGCRegion( dc );
|
||||
}
|
||||
}
|
||||
release_dc_ptr( dc );
|
||||
}
|
||||
return ret;
|
||||
|
|
|
@ -401,14 +401,10 @@ BOOL CDECL PSDRV_DeleteDC( PSDRV_PDEVICE *physDev )
|
|||
HDC CDECL PSDRV_ResetDC( PSDRV_PDEVICE *physDev, const DEVMODEW *lpInitData )
|
||||
{
|
||||
if(lpInitData) {
|
||||
HRGN hrgn;
|
||||
DEVMODEA *devmodeA = DEVMODEdupWtoA(PSDRV_Heap, lpInitData);
|
||||
PSDRV_MergeDevmodes(physDev->Devmode, (PSDRV_DEVMODEA *)devmodeA, physDev->pi);
|
||||
HeapFree(PSDRV_Heap, 0, devmodeA);
|
||||
PSDRV_UpdateDevCaps(physDev);
|
||||
hrgn = CreateRectRgn(0, 0, physDev->horzRes, physDev->vertRes);
|
||||
SelectVisRgn( physDev->hdc, hrgn );
|
||||
DeleteObject(hrgn);
|
||||
}
|
||||
return physDev->hdc;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue