aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2016-12-05 16:57:30 +0100
committerPierre Ossman <ossman@cendio.se>2017-02-24 13:15:40 +0100
commit77ede0a01faa06d9d241da0c62a41d6b388a521c (patch)
treee0cec47f3f11f010329f1f8e3d4076976e4898b5 /common
parentcef3cf793d1daa6bbb12ec1065b3e510a8baf203 (diff)
downloadtigervnc-77ede0a01faa06d9d241da0c62a41d6b388a521c.tar.gz
tigervnc-77ede0a01faa06d9d241da0c62a41d6b388a521c.zip
Clean up VNCSConnectionST::needRenderedCursor()
Make it a bit more readable.
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;
}