From 5c03720319d907f2427ed4296ceaec7ee2c06719 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Mon, 5 Dec 2016 17:00:35 +0100 Subject: [PATCH] Avoid flicker with a rendered cursor This is not the code path commonly used in performance sensitive scenarios, so favour correctness over performance. --- common/rfb/VNCSConnectionST.cxx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx index ea50f832..8d19acb7 100644 --- a/common/rfb/VNCSConnectionST.cxx +++ b/common/rfb/VNCSConnectionST.cxx @@ -1080,15 +1080,10 @@ void VNCSConnectionST::writeDataUpdate() cursor = NULL; } - // We could remove the new cursor rect from updates here. It's not clear - // whether this is worth it. If we do remove it, then we won't draw over - // the same bit of screen twice, but we have the overhead of a more complex - // region. - - //if (cursor) { - // updates.subtract(renderedCursorRect); - // updates.getUpdateInfo(&ui, req); - //} + if (cursor) { + updates.subtract(renderedCursorRect); + updates.getUpdateInfo(&ui, req); + } damagedCursorRegion.assign_union(renderedCursorRect); updateRenderedCursor = false; -- 2.39.5