summaryrefslogtreecommitdiffstats
path: root/unix/xserver
diff options
context:
space:
mode:
authorAdam Tkac <atkac@redhat.com>2010-08-25 13:40:10 +0000
committerAdam Tkac <atkac@redhat.com>2010-08-25 13:40:10 +0000
commit8109fc96635b24cc9f185003b1c0e2c6076b72fd (patch)
tree8ef31b150b4157d0acfb8d730a4899c1542ade70 /unix/xserver
parent80fb7efb29af87919a35bb8a609f50b29728d57e (diff)
downloadtigervnc-8109fc96635b24cc9f185003b1c0e2c6076b72fd.tar.gz
tigervnc-8109fc96635b24cc9f185003b1c0e2c6076b72fd.zip
[Bugfix] Xvnc: define 32bit pixel format correctly when enabled.
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4124 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'unix/xserver')
-rw-r--r--unix/xserver/hw/vnc/xvnc.cc19
1 files changed, 14 insertions, 5 deletions
diff --git a/unix/xserver/hw/vnc/xvnc.cc b/unix/xserver/hw/vnc/xvnc.cc
index 15235e10..d5bffbeb 100644
--- a/unix/xserver/hw/vnc/xvnc.cc
+++ b/unix/xserver/hw/vnc/xvnc.cc
@@ -1203,13 +1203,22 @@ vfbScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
pScreen->blackPixel = pvfb->blackPixel;
pScreen->whitePixel = pvfb->whitePixel;
- if (!pvfb->pixelFormatDefined && pvfb->fb.depth == 16) {
+ if (!pvfb->pixelFormatDefined) {
pvfb->pixelFormatDefined = TRUE;
- pvfb->rgbNotBgr = TRUE;
- pvfb->blueBits = pvfb->redBits = 5;
- pvfb->greenBits = 6;
+
+ switch (pvfb->fb.depth) {
+ case 16:
+ pvfb->rgbNotBgr = TRUE;
+ pvfb->blueBits = pvfb->redBits = 5;
+ pvfb->greenBits = 6;
+ break;
+ case 32:
+ pvfb->rgbNotBgr = TRUE;
+ pvfb->blueBits = pvfb->redBits = pvfb->greenBits = 8;
+ break;
+ }
}
-
+
if (pvfb->pixelFormatDefined) {
VisualPtr vis = pScreen->visuals;
for (int i = 0; i < pScreen->numVisuals; i++) {