]> source.dussan.org Git - tigervnc.git/commitdiff
Changes outside the framebuffer can sometimes be reported so we need to
authorPierre Ossman <ossman@cendio.se>
Tue, 9 Jun 2009 14:18:26 +0000 (14:18 +0000)
committerPierre Ossman <ossman@cendio.se>
Tue, 9 Jun 2009 14:18:26 +0000 (14:18 +0000)
make sure that we can deal with them gracefully.

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/branches/1_0@3833 3789f03b-4d11-0410-bbf8-ca57d06f2519

common/rfb/ComparingUpdateTracker.cxx

index 40f5142e7acd3485955dfec191391151e3b570ac..cd579a8e057aa1060b84426ba13d17776a2df2ed 100644 (file)
@@ -73,7 +73,11 @@ void ComparingUpdateTracker::compare()
 void ComparingUpdateTracker::compareRect(const Rect& r, Region* newChanged)
 {
   if (!r.enclosed_by(fb->getRect())) {
-    fprintf(stderr,"ComparingUpdateTracker: rect outside fb (%d,%d-%d,%d)\n", r.tl.x, r.tl.y, r.br.x, r.br.y);
+    Rect safe;
+    // Crop the rect and try again
+    safe = r.intersect(fb->getRect());
+    if (!safe.is_empty())
+      compareRect(safe, newChanged);
     return;
   }