From: Pierre Ossman Date: Thu, 16 Nov 2017 15:44:36 +0000 (+0100) Subject: Fix bug where server cursor might disappear X-Git-Tag: v1.8.90~65 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=387a41770ba5f0ee5b30b78b4c537de342064d9e;p=tigervnc.git 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. --- 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()