[Spice-devel] Problem with mouse input
Walter Mitty
waltermitty121906 at gmail.com
Mon Apr 25 02:06:13 UTC 2022
Hi,
I’m learning spice source code. And recently, when I used a drawing app I
found some mouse input events were dropped. I tried to understand it from
the code.
>From code perspective, In inputs-channel.c, spice-gtk will check if
*motion_count* is smaller than SPICE_INPUT_MOTION_ACK_BUNCH((which is 4)) *
2. On spice-server, at on_mouse_motion(), on every
SPICE_INPUT_MOTION_ACK_BUNCHmouse motion events, server side sends a
RED_PIPE_ITEM_MOUSE_MOTION_ACK
event to client. And in
response, the client reduces *motion_count *by 4 and continues event
sending. It seems that before the client response finishes, some events are
dropped.
I wanna avoid event dropping, my idea is taking advantage of the event
queue to store all events. And the server retrieves events from the queue
to write to the virtual device .
My question is: Is the event dropping reasonable? Could you please give
some advice about how to avoid it? Thanks very much~
Regards,
Walter.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20220425/b1df170c/attachment.htm>
More information about the Spice-devel
mailing list