summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/xwin/winrandr.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/hw/xwin/winrandr.c b/hw/xwin/winrandr.c
index 1bd97f963..46f0cf417 100644
--- a/hw/xwin/winrandr.c
+++ b/hw/xwin/winrandr.c
@@ -278,6 +278,21 @@ winRandRInit(ScreenPtr pScreen)
/* Set mode to current display size */
winRandRUpdateMode(pScreen, output);
+
+ /* Make up some physical dimensions */
+ output->mmWidth = (pScreen->width * 25.4)/monitorResolution;
+ output->mmHeight = (pScreen->height * 25.4)/monitorResolution;
+
+ /* Allocate and make up a (fixed, linear) gamma ramp */
+ {
+ int i;
+ RRCrtcGammaSetSize(crtc, 256);
+ for (i = 0; i < crtc->gammaSize; i++) {
+ crtc->gammaRed[i] = i << 8;
+ crtc->gammaBlue[i] = i << 8;
+ crtc->gammaGreen[i] = i << 8;
+ }
+ }
}
/*