summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2009-06-09 14:18:26 +0000
committerPierre Ossman <ossman@cendio.se>2009-06-09 14:18:26 +0000
commit5b0ed815ebdcbe7fb1ebbe29e12b5d24c458b242 (patch)
treec2e7253a09de6f442120adccc4ac688b06c25cf4
parent67280d3101c538e8d00a55e07b4023b6f3feddb9 (diff)
downloadtigervnc-5b0ed815ebdcbe7fb1ebbe29e12b5d24c458b242.tar.gz
tigervnc-5b0ed815ebdcbe7fb1ebbe29e12b5d24c458b242.zip
Changes outside the framebuffer can sometimes be reported so we need to
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
-rw-r--r--common/rfb/ComparingUpdateTracker.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/rfb/ComparingUpdateTracker.cxx b/common/rfb/ComparingUpdateTracker.cxx
index 40f5142e..cd579a8e 100644
--- a/common/rfb/ComparingUpdateTracker.cxx
+++ b/common/rfb/ComparingUpdateTracker.cxx
@@ -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;
}