diff options
author | Pierre Ossman <ossman@cendio.se> | 2016-12-05 16:57:30 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2017-02-24 13:15:40 +0100 |
commit | 77ede0a01faa06d9d241da0c62a41d6b388a521c (patch) | |
tree | e0cec47f3f11f010329f1f8e3d4076976e4898b5 /common | |
parent | cef3cf793d1daa6bbb12ec1065b3e510a8baf203 (diff) | |
download | tigervnc-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.cxx | 13 |
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; } |