From b64dbf29aeaaa41eed47ea48e3ccfa9ae563c6f2 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 9 Jun 2015 16:10:39 +0200 Subject: [PATCH] Avoid losing updates on partial requests A request may be for only part of the frame buffer, meaning we cannot discard all changes just because we've send out an update. There might still be modified areas remaining that haven't been requested yet. --- common/rfb/VNCSConnectionST.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx index f45ee7e0..c63e6b62 100644 --- a/common/rfb/VNCSConnectionST.cxx +++ b/common/rfb/VNCSConnectionST.cxx @@ -1056,8 +1056,11 @@ void VNCSConnectionST::writeFramebufferUpdate() writeRTTPing(); + // The request might be for just part of the screen, so we cannot + // just clear the entire update tracker. + updates.subtract(requested); + requested.clear(); - updates.clear(); } out: -- 2.39.5