Commit c73e2d5e authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32: Reset the visible region in ResetDC.

parent e4beddb6
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment