From 5b0ed815ebdcbe7fb1ebbe29e12b5d24c458b242 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 9 Jun 2009 14:18:26 +0000 Subject: 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 --- common/rfb/ComparingUpdateTracker.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3