mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-26 07:17:23 +00:00
[client] spice: fix incorrect cursor button state being sent
This commit is contained in:
parent
bfc4a1bc16
commit
92d87d983b
@ -490,6 +490,7 @@ bool spice_on_inputs_channel_read()
|
|||||||
while(spice.mouse.queueLen && sent < 4)
|
while(spice.mouse.queueLen && sent < 4)
|
||||||
{
|
{
|
||||||
SpiceMsgcMouseMotion *msg = &spice.mouse.queue[spice.mouse.rpos];
|
SpiceMsgcMouseMotion *msg = &spice.mouse.queue[spice.mouse.rpos];
|
||||||
|
msg->button_state = spice.mouse.buttonState;
|
||||||
if (!spice_write_msg(channel, SPICE_MSGC_INPUTS_MOUSE_MOTION, msg, sizeof(SpiceMsgcMouseMotion)))
|
if (!spice_write_msg(channel, SPICE_MSGC_INPUTS_MOUSE_MOTION, msg, sizeof(SpiceMsgcMouseMotion)))
|
||||||
{
|
{
|
||||||
DEBUG_ERROR("failed to send post ack");
|
DEBUG_ERROR("failed to send post ack");
|
||||||
@ -881,7 +882,6 @@ bool spice_mouse_motion(int32_t x, int32_t y)
|
|||||||
&spice.mouse.queue[spice.mouse.wpos++];
|
&spice.mouse.queue[spice.mouse.wpos++];
|
||||||
msg->x = x;
|
msg->x = x;
|
||||||
msg->y = y;
|
msg->y = y;
|
||||||
msg->button_state = spice.mouse.buttonState;
|
|
||||||
|
|
||||||
if (spice.mouse.wpos == SPICE_MOUSE_QUEUE_SIZE)
|
if (spice.mouse.wpos == SPICE_MOUSE_QUEUE_SIZE)
|
||||||
spice.mouse.wpos = 0;
|
spice.mouse.wpos = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user