summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/xwin/glx/indirect.c15
-rw-r--r--hw/xwin/winlayouts.h1
-rw-r--r--hw/xwin/winrandr.c37
3 files changed, 30 insertions, 23 deletions
diff --git a/hw/xwin/glx/indirect.c b/hw/xwin/glx/indirect.c
index 4948807d9..6c700a254 100644
--- a/hw/xwin/glx/indirect.c
+++ b/hw/xwin/glx/indirect.c
@@ -2442,21 +2442,6 @@ glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen, PixelFormatRejectStats *
| (ATTR_VALUE(WGL_DRAW_TO_BITMAP_ARB, 0) ? GLX_PIXMAP_BIT : 0)
| (ATTR_VALUE(WGL_DRAW_TO_PBUFFER_ARB, 0) ? GLX_PBUFFER_BIT : 0));
- /*
- Assume OpenGL RGBA rendering is available on all visuals
- (it is specified to render to red component in single-channel visuals,
- if supported, but there doesn't seem to be any mechanism to check if it
- is supported)
-
- Color index rendering is only supported on single-channel visuals
- */
- if (c->base.visualType == GLX_STATIC_COLOR) {
- c->base.renderType = GLX_RGBA_BIT | GLX_COLOR_INDEX_BIT;
- }
- else {
- c->base.renderType = GLX_RGBA_BIT;
- }
-
c->base.fbconfigID = -1; // will be set by __glXScreenInit()
/* SGIX_pbuffer / GLX 1.3 */
diff --git a/hw/xwin/winlayouts.h b/hw/xwin/winlayouts.h
index c7905e3c2..0b02fa446 100644
--- a/hw/xwin/winlayouts.h
+++ b/hw/xwin/winlayouts.h
@@ -82,6 +82,7 @@ WinKBLayoutRec winKBLayouts[] = {
{0x00000416, -1, "pc105", "br", NULL, NULL, "Portuguese (Brazil,ABNT)"},
{0x00010416, -1, "abnt2", "br", NULL, NULL, "Portuguese (Brazil,ABNT2)"},
{0x00000816, -1, "pc105", "pt", NULL, NULL, "Portuguese (Portugal)"},
+ {0x00000419, -1, "pc105", "ru", NULL, NULL, "Russian"},
{0x0000041a, -1, "pc105", "hr", NULL, NULL, "Croatian"},
{0x0000041d, -1, "pc105", "se", NULL, NULL, "Swedish (Sweden)"},
{0x0000041f, -1, "pc105", "tr", NULL, NULL, "Turkish (Q)"},
diff --git a/hw/xwin/winrandr.c b/hw/xwin/winrandr.c
index 1c1047a45..46f0cf417 100644
--- a/hw/xwin/winrandr.c
+++ b/hw/xwin/winrandr.c
@@ -42,17 +42,17 @@
static Bool
winRandRGetInfo(ScreenPtr pScreen, Rotation * pRotations)
{
- rrScrPrivPtr pRRScrPriv;
- RROutputPtr output;
-
- pRRScrPriv = rrGetScrPriv(pScreen);
- output = pRRScrPriv->outputs[0];
-
winDebug("winRandRGetInfo ()\n");
/* Don't support rotations */
*pRotations = RR_Rotate_0;
+ return TRUE;
+}
+
+static void
+winRandRUpdateMode(ScreenPtr pScreen, RROutputPtr output)
+{
/* Delete previous mode */
if (output->modes[0])
{
@@ -83,8 +83,6 @@ winRandRGetInfo(ScreenPtr pScreen, Rotation * pRotations)
mode = RRModeGet(&modeInfo, name);
output->crtc->mode = mode;
}
-
- return TRUE;
}
/*
@@ -95,6 +93,7 @@ winDoRandRScreenSetSize(ScreenPtr pScreen,
CARD16 width,
CARD16 height, CARD32 mmWidth, CARD32 mmHeight)
{
+ rrScrPrivPtr pRRScrPriv;
winScreenPriv(pScreen);
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
WindowPtr pRoot = pScreen->root;
@@ -136,6 +135,10 @@ winDoRandRScreenSetSize(ScreenPtr pScreen,
// and arrange for it to be repainted
pScreen->PaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND);
+ // Set mode to current display size
+ pRRScrPriv = rrGetScrPriv(pScreen);
+ winRandRUpdateMode(pScreen, pRRScrPriv->primaryOutput);
+
/* Indicate that a screen size change took place */
RRScreenSizeNotify(pScreen);
}
@@ -272,6 +275,24 @@ winRandRInit(ScreenPtr pScreen)
/* Ensure we have space for exactly one mode */
output->modes = malloc(sizeof(RRModePtr));
output->modes[0] = NULL;
+
+ /* 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;
+ }
+ }
}
/*