aboutsummaryrefslogtreecommitdiffstats
path: root/vncviewer
diff options
context:
space:
mode:
authorPeter Åstrand <astrand@cendio.se>2004-12-23 08:27:12 +0000
committerPeter Åstrand <astrand@cendio.se>2004-12-23 08:27:12 +0000
commit6edc545b4e3343cd263d961eccd00cc75e829990 (patch)
tree35f8ea65bf49ce72dd58877f71e48deb0fb4da12 /vncviewer
parent3b170eea935454943bb4d6842af34c9a8077489f (diff)
downloadtigervnc-6edc545b4e3343cd263d961eccd00cc75e829990.tar.gz
tigervnc-6edc545b4e3343cd263d961eccd00cc75e829990.zip
When using AutoSelect, enable automatic selection of color level, but
only for servers with version 3.8 or newer. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@51 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'vncviewer')
-rw-r--r--vncviewer/cview.cxx18
1 files changed, 10 insertions, 8 deletions
diff --git a/vncviewer/cview.cxx b/vncviewer/cview.cxx
index 5f8a901f..a9a15ff2 100644
--- a/vncviewer/cview.cxx
+++ b/vncviewer/cview.cxx
@@ -1151,14 +1151,17 @@ CView::autoSelectFormatAndEncoding() {
return;
}
- // FIXME: The code below is currently disabled, since, as far as I
- // understand, it is not possible to switch pixel format on the fly
- // against TightVNC 1.2.X servers, for example. See mail to the
- // mailing list, sent on 2004-12-21. If we cannot find any better
- // solution, we could add code to only allow pixel format switching
- // against VNC4 servers (if these don't use deferred updates).
+ if (cp.majorVersion <= 3 && cp.minorVersion <= 7) {
+ // Xvnc from TightVNC 1.2.9 sends out FramebufferUpdates with
+ // cursors "asynchronously". If this happens in the middle of a
+ // pixel format change, the server will encode the cursor with
+ // the old format, but the client will try to decode it
+ // according to the new format. This will lead to a
+ // crash. Therefore, we do not allow automatic format change for
+ // old servers.
+ return;
+ }
-#if 0
// Select best color level
newFullColour = (kbitsPerSecond > 256);
if (newFullColour != options.fullColour) {
@@ -1168,7 +1171,6 @@ CView::autoSelectFormatAndEncoding() {
options.fullColour = newFullColour;
formatChange = true;
}
-#endif
}
void