gdi32: Fully reset the DC state before deleting it.

This commit is contained in:
Alexandre Julliard 2012-11-27 13:24:18 +01:00
parent 6c94d4466a
commit 4ad5287496
1 changed files with 1 additions and 15 deletions

View File

@ -815,21 +815,7 @@ BOOL WINAPI DeleteDC( HDC hdc )
release_dc_ptr( dc );
return TRUE;
}
while (dc->saveLevel)
{
DC *dcs = dc->saved_dc;
dc->saved_dc = dcs->saved_dc;
dc->saveLevel--;
free_dc_state( dcs );
}
AbortPath( hdc );
SelectObject( hdc, GetStockObject(BLACK_PEN) );
SelectObject( hdc, GetStockObject(WHITE_BRUSH) );
SelectObject( hdc, GetStockObject(SYSTEM_FONT) );
SelectObject( hdc, GetStockObject(DEFAULT_BITMAP) );
reset_dc_state( hdc );
free_dc_ptr( dc );
return TRUE;
}