Skip to content

Commit

Permalink
[client] use mouse visibility info properly
Browse files Browse the repository at this point in the history
  • Loading branch information
gnif committed Oct 9, 2018
1 parent f36fd5a commit 2692ccc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,17 @@ int cursorThread(void * unused)
// now we have taken the mouse data, we can flag to the host we are ready
state.shm->cursor.flags = 0;

bool showCursor = header.flags & KVMFR_CURSOR_FLAG_VISIBLE;
if (header.flags & KVMFR_CURSOR_FLAG_POS)
{
state.cursor.x = header.x;
state.cursor.y = header.y;
state.cursorVisible = header.flags & KVMFR_CURSOR_FLAG_VISIBLE;
state.haveCursorPos = true;
}

if (showCursor != state.cursorVisible || header.flags & KVMFR_CURSOR_FLAG_POS)
{
state.cursorVisible = showCursor;
state.lgr->on_mouse_event
(
state.lgrData,
Expand Down

0 comments on commit 2692ccc

Please sign in to comment.