Special handling of a rectangular video area in the UpdateTracker and derived/related classes.

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2327 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/rfb/VNCServerST.cxx b/common/rfb/VNCServerST.cxx
index c02c2eb..e5354a4 100644
--- a/common/rfb/VNCServerST.cxx
+++ b/common/rfb/VNCServerST.cxx
@@ -314,6 +314,11 @@
   comparer->add_copied(dest, delta);
 }
 
+void VNCServerST::set_video_area(const Rect &rect)
+{
+  comparer->set_video_area(rect);
+}
+
 bool VNCServerST::clientsReadyForUpdate()
 {
   std::list<VNCSConnectionST*>::iterator ci;
@@ -459,7 +464,7 @@
   if (ui.is_empty() && !(renderCursor && renderedCursorInvalid))
     return;
 
-  Region toCheck = ui.changed.union_(ui.copied);
+  Region toCheck = ui.changed.union_(ui.copied).union_(ui.video_area);
 
   if (renderCursor) {
     Rect clippedCursorRect
@@ -495,6 +500,7 @@
     ci_next = ci; ci_next++;
     (*ci)->add_copied(ui.copied, ui.copy_delta);
     (*ci)->add_changed(ui.changed);
+    (*ci)->set_video_area(ui.video_area);
   }
 
   comparer->clear();