aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/rfb/VNCSConnectionST.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx
index 6012d74e..64adda1a 100644
--- a/common/rfb/VNCSConnectionST.cxx
+++ b/common/rfb/VNCSConnectionST.cxx
@@ -377,9 +377,16 @@ void VNCSConnectionST::renderedCursorChange()
bool VNCSConnectionST::needRenderedCursor()
{
- bool pointerpos = (!server->cursorPos.equals(pointerEventPos) && (time(0) - pointerEventTime) > 0);
- return (state() == RFBSTATE_NORMAL
- && ((!cp.supportsLocalCursor && !cp.supportsLocalXCursor) || pointerpos));
+ if (state() != RFBSTATE_NORMAL)
+ return false;
+
+ if (!cp.supportsLocalCursor && !cp.supportsLocalXCursor)
+ return true;
+ if (!server->cursorPos.equals(pointerEventPos) &&
+ (time(0) - pointerEventTime) > 0)
+ return true;
+
+ return false;
}