diff -uprk.orig xorg-server-1.4.2.orig/hw/xfree86/common/xf86RandR.c xorg-server-1.4.2/hw/xfree86/common/xf86RandR.c --- xorg-server-1.4.2.orig/hw/xfree86/common/xf86RandR.c 2008-06-11 19:27:40 +0500 +++ xorg-server-1.4.2/hw/xfree86/common/xf86RandR.c 2008-09-25 16:54:51 +0500 @@ -171,6 +171,26 @@ xf86RandRSetMode (ScreenPtr pScreen, scrp->virtualX = mode->HDisplay; scrp->virtualY = mode->VDisplay; } + + /* + * The DIX forgets the physical dimensions we passed into RRRegisterSize, so + * reconstruct them if possible. + */ + if(scrp->DriverFunc) + { + xorgRRModeMM RRModeMM; + + RRModeMM.mode = mode; + RRModeMM.virtX = scrp->virtualX; + RRModeMM.virtY = scrp->virtualY; + RRModeMM.mmWidth = mmWidth; + RRModeMM.mmHeight = mmHeight; + + (*scrp->DriverFunc)(scrp, RR_GET_MODE_MM, &RRModeMM); + + mmWidth = RRModeMM.mmWidth; + mmHeight = RRModeMM.mmHeight; + } if(randrp->rotation & (RR_Rotate_90 | RR_Rotate_270)) { /* If the screen is rotated 90 or 270 degrees, swap the sizes. */