From 387a41770ba5f0ee5b30b78b4c537de342064d9e Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Thu, 16 Nov 2017 16:44:36 +0100 Subject: [PATCH] Fix bug where server cursor might disappear We shouldn't unconditionally remove the server side cursor just because the client supports client side cursors. We need to also check that the client fulfills the other criteria for taking over the cursor. --- common/rfb/VNCSConnectionST.cxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx index 619b0a24..bd4bc366 100644 --- a/common/rfb/VNCSConnectionST.cxx +++ b/common/rfb/VNCSConnectionST.cxx @@ -834,12 +834,10 @@ void VNCSConnectionST::enableContinuousUpdates(bool enable, void VNCSConnectionST::supportsLocalCursor() { - if (cp.supportsLocalCursorWithAlpha || - cp.supportsLocalCursor || cp.supportsLocalXCursor) { - if (!damagedCursorRegion.is_empty()) - removeRenderedCursor = true; - setCursor(); - } + bool hasRenderedCursor = !damagedCursorRegion.is_empty(); + if (hasRenderedCursor && !needRenderedCursor()) + removeRenderedCursor = true; + setCursor(); } void VNCSConnectionST::supportsFence() -- 2.39.5