The logic got inverted resulting in the cursor being sent needlessly
whenever the cursor moved.
{
if (state() != RFBSTATE_NORMAL) return;
// Are we switching between client-side and server-side cursor?
- if (damagedCursorRegion.is_empty() != needRenderedCursor())
+ bool hasRenderedCursor = !damagedCursorRegion.is_empty();
+ if (hasRenderedCursor != needRenderedCursor())
setCursorOrClose();
- if (!damagedCursorRegion.is_empty())
+ if (hasRenderedCursor)
removeRenderedCursor = true;
if (needRenderedCursor()) {
updateRenderedCursor = true;