diff options
Diffstat (limited to 'common/rfb/ComparingUpdateTracker.cxx')
-rw-r--r-- | common/rfb/ComparingUpdateTracker.cxx | 6 |
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; } |