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
This commit is contained in:
Peter Åstrand 2004-12-23 08:27:12 +00:00
parent 3b170eea93
commit 6edc545b4e
2 changed files with 20 additions and 16 deletions

View File

@ -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

View File

@ -635,14 +635,17 @@ void CConn::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 != fullColour) {
@ -652,7 +655,6 @@ void CConn::autoSelectFormatAndEncoding()
fullColour = newFullColour;
formatChange = true;
}
#endif
}
// checkEncodings() sends a setEncodings message if one is needed.