Restored the functionality of the VideoPriority parameter. This time, it
should work correctly even over slow networks, when update requests go less
frequently than polling cycles. This version does not give any special
meaning to the value 0, it is equivalent to 1.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2584 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx
index 95b99fd..a9c59f3 100644
--- a/common/rfb/VNCSConnectionST.cxx
+++ b/common/rfb/VNCSConnectionST.cxx
@@ -541,7 +541,13 @@
updates.enable_copyrect(cp.useCopyRect);
- server->checkUpdate();
+ static int counter = 1;
+ if (--counter > 0) {
+ server->checkVideoUpdate();
+ } else {
+ counter = rfb::Server::videoPriority;
+ server->checkUpdate();
+ }
// Get the lists of updates. Prior to exporting the data to the `ui' object,
// getUpdateInfo() will normalize the `updates' object such way that its