diff --git a/randr/randr.c b/randr/randr.c index 1470035ca..5fa9baf84 100644 --- a/randr/randr.c +++ b/randr/randr.c @@ -243,6 +243,10 @@ Bool RRScreenInit(ScreenPtr pScreen) pScrPriv->maxWidth = pScrPriv->minWidth = pScreen->width; pScrPriv->maxHeight = pScrPriv->minHeight = pScreen->height; + pScrPriv->width = pScreen->width; + pScrPriv->height = pScreen->height; + pScrPriv->mmWidth = pScreen->mmWidth; + pScrPriv->mmHeight = pScreen->mmHeight; #if RANDR_12_INTERFACE pScrPriv->rrScreenSetSize = NULL; pScrPriv->rrCrtcSet = NULL; diff --git a/randr/randrstr.h b/randr/randrstr.h index 88f7588ae..136a47e43 100644 --- a/randr/randrstr.h +++ b/randr/randrstr.h @@ -224,6 +224,7 @@ typedef struct _rrScrPriv { CARD16 minWidth, minHeight; CARD16 maxWidth, maxHeight; CARD16 width, height; /* last known screen size */ + CARD16 mmWidth, mmHeight; /* last known screen size */ int numOutputs; RROutputPtr *outputs; diff --git a/randr/rrscreen.c b/randr/rrscreen.c index 7947f80eb..e10aa0362 100644 --- a/randr/rrscreen.c +++ b/randr/rrscreen.c @@ -158,11 +158,15 @@ RRScreenSizeNotify (ScreenPtr pScreen) * pixel size */ if (pScrPriv->width == pScreen->width && - pScrPriv->height == pScreen->height) + pScrPriv->height == pScreen->height && + pScrPriv->mmWidth == pScreen->mmWidth && + pScrPriv->mmHeight == pScreen->mmHeight) return; pScrPriv->width = pScreen->width; pScrPriv->height = pScreen->height; + pScrPriv->mmWidth = pScreen->mmWidth; + pScrPriv->mmHeight = pScreen->mmHeight; pScrPriv->changed = TRUE; /* pScrPriv->sizeChanged = TRUE; */