Update the visrgn in ResetDC so that GetClipBox works correctly after
a change in paper size/orientation.
This commit is contained in:
parent
df93214a52
commit
9fb3f4e0d7
|
@ -35,6 +35,7 @@
|
||||||
#include "winreg.h"
|
#include "winreg.h"
|
||||||
#include "winspool.h"
|
#include "winspool.h"
|
||||||
#include "winerror.h"
|
#include "winerror.h"
|
||||||
|
#include "wownt32.h"
|
||||||
#include "heap.h"
|
#include "heap.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(psdrv);
|
WINE_DEFAULT_DEBUG_CHANNEL(psdrv);
|
||||||
|
@ -386,8 +387,12 @@ BOOL PSDRV_DeleteDC( PSDRV_PDEVICE *physDev )
|
||||||
HDC PSDRV_ResetDC( PSDRV_PDEVICE *physDev, const DEVMODEA *lpInitData )
|
HDC PSDRV_ResetDC( PSDRV_PDEVICE *physDev, const DEVMODEA *lpInitData )
|
||||||
{
|
{
|
||||||
if(lpInitData) {
|
if(lpInitData) {
|
||||||
|
HRGN hrgn;
|
||||||
PSDRV_MergeDevmodes(physDev->Devmode, (PSDRV_DEVMODEA *)lpInitData, physDev->pi);
|
PSDRV_MergeDevmodes(physDev->Devmode, (PSDRV_DEVMODEA *)lpInitData, physDev->pi);
|
||||||
PSDRV_UpdateDevCaps(physDev);
|
PSDRV_UpdateDevCaps(physDev);
|
||||||
|
hrgn = CreateRectRgn(0, 0, physDev->horzRes, physDev->vertRes);
|
||||||
|
SelectVisRgn16(HDC_16(physDev->hdc), HRGN_16(hrgn));
|
||||||
|
DeleteObject(hrgn);
|
||||||
}
|
}
|
||||||
return physDev->hdc;
|
return physDev->hdc;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue