aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-12-23 15:34:09 +0000
committermarha <marha@users.sourceforge.net>2010-12-23 15:34:09 +0000
commit62681065583ccb0efbf03863fe8f5c5b37b28f73 (patch)
treec441f811836874ade1710ea3d015193d3fe69c06
parent3cbf9b94e215c6a0c3df6117c62e8923e70b4313 (diff)
downloadvcxsrv-62681065583ccb0efbf03863fe8f5c5b37b28f73.tar.gz
vcxsrv-62681065583ccb0efbf03863fe8f5c5b37b28f73.tar.bz2
vcxsrv-62681065583ccb0efbf03863fe8f5c5b37b28f73.zip
Fill in transparent color correctly
-rw-r--r--xorg-server/hw/xwin/glx/indirect.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/xorg-server/hw/xwin/glx/indirect.c b/xorg-server/hw/xwin/glx/indirect.c
index d1c48f524..5ff713a94 100644
--- a/xorg-server/hw/xwin/glx/indirect.c
+++ b/xorg-server/hw/xwin/glx/indirect.c
@@ -2029,20 +2029,24 @@ glxWinCreateConfigs(HDC hdc, glxWinScreen *screen)
if (pfd.iPixelType == PFD_TYPE_COLORINDEX)
{
c->base.visualType = GLX_STATIC_COLOR;
+ c->base.transparentRed = GLX_NONE;
+ c->base.transparentGreen = GLX_NONE;
+ c->base.transparentBlue = GLX_NONE;
+ c->base.transparentAlpha = GLX_NONE;
+ c->base.transparentIndex = pfd.dwVisibleMask;
+ c->base.transparentPixel = GLX_TRANSPARENT_INDEX;
}
else
{
c->base.visualType = GLX_TRUE_COLOR;
+ c->base.transparentRed = (pfd.dwVisibleMask&c->base.redMask) >>pfd.cRedShift;
+ c->base.transparentGreen = (pfd.dwVisibleMask&c->base.greenMask)>>pfd.cGreenShift;
+ c->base.transparentBlue = (pfd.dwVisibleMask&c->base.blueMask) >>pfd.cBlueShift;
+ c->base.transparentAlpha = (pfd.dwVisibleMask&c->base.alphaMask)>>pfd.cAlphaShift;
+ c->base.transparentIndex = GLX_NONE;
+ c->base.transparentPixel = GLX_TRANSPARENT_RGB;
}
- // pfd.dwVisibleMask; ???
- c->base.transparentPixel = GLX_NONE;
- c->base.transparentRed = GLX_NONE;
- c->base.transparentGreen = GLX_NONE;
- c->base.transparentBlue = GLX_NONE;
- c->base.transparentAlpha = GLX_NONE;
- c->base.transparentIndex = GLX_NONE;
-
/* ARB_multisample / SGIS_multisample */
c->base.sampleBuffers = 0;
c->base.samples = 0;