]> source.dussan.org Git - tigervnc.git/commitdiff
Fix bug where server cursor might disappear
authorPierre Ossman <ossman@cendio.se>
Thu, 16 Nov 2017 15:44:36 +0000 (16:44 +0100)
committerPierre Ossman <ossman@cendio.se>
Fri, 17 Nov 2017 07:06:30 +0000 (08:06 +0100)
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

index 619b0a24a3aa591e8bd36448a20db0d81d9e3b32..bd4bc366aff3377ab9a4046484f35e340f1d5a5b 100644 (file)
@@ -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()