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/VNCServerST.cxx b/common/rfb/VNCServerST.cxx
index 93f947c..dc6c709 100644
--- a/common/rfb/VNCServerST.cxx
+++ b/common/rfb/VNCServerST.cxx
@@ -507,6 +507,22 @@
   comparer->clear();
 }
 
+void VNCServerST::checkVideoUpdate()
+{
+  const Rect &videoRect = comparer->getVideoArea();
+  Region videoRegion(videoRect);
+
+  if (!videoRegion.is_empty()) {
+    pb->grabRegion(videoRegion);
+
+    std::list<VNCSConnectionST*>::iterator ci, ci_next;
+    for (ci = clients.begin(); ci != clients.end(); ci = ci_next) {
+      ci_next = ci; ci_next++;
+      (*ci)->set_video_area(videoRect);
+    }
+  }
+}
+
 void VNCServerST::getConnInfo(ListConnInfo * listConn)
 {
   listConn->Clear();