mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38:20 +00:00
[client] main: copy & release KVMFR messages sooner
The renderer may take time to process the cursor update due to various internal factors, as such it's best we copy the data and mark the message as done ASAP. This prevents the host from filling up the queue as easily when a high dpi mouse is in use.
This commit is contained in:
parent
b9d7674b20
commit
092ce61908
@ -286,7 +286,11 @@ static int cursorThread(void * unused)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
KVMFRCursor * cursor = (KVMFRCursor *)msg.mem;
|
/* copy and release the message ASAP */
|
||||||
|
char buffer[msg.size];
|
||||||
|
memcpy(buffer, msg.mem, msg.size);
|
||||||
|
KVMFRCursor * cursor = (KVMFRCursor *)buffer;
|
||||||
|
lgmpClientMessageDone(queue);
|
||||||
|
|
||||||
g_cursor.guest.visible =
|
g_cursor.guest.visible =
|
||||||
msg.udata & CURSOR_FLAG_VISIBLE;
|
msg.udata & CURSOR_FLAG_VISIBLE;
|
||||||
@ -318,7 +322,6 @@ static int cursorThread(void * unused)
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
DEBUG_ERROR("Failed to update mouse shape");
|
DEBUG_ERROR("Failed to update mouse shape");
|
||||||
lgmpClientMessageDone(queue);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -341,7 +344,6 @@ static int cursorThread(void * unused)
|
|||||||
core_handleGuestMouseUpdate();
|
core_handleGuestMouseUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
lgmpClientMessageDone(queue);
|
|
||||||
g_cursor.redraw = false;
|
g_cursor.redraw = false;
|
||||||
|
|
||||||
g_state.lgr->on_mouse_event
|
g_state.lgr->on_mouse_event
|
||||||
|
Loading…
Reference in New Issue
Block a user