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 619b0a2..bd4bc36 100644
--- a/common/rfb/VNCSConnectionST.cxx
+++ b/common/rfb/VNCSConnectionST.cxx
@@ -834,12 +834,10 @@
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()