Re: Problem with mouse input

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
   the intention is clear, collapse the movements (sum up relative movements) to avoid a queue getting too big. If you need a larger queue you can simply change the check on spice-gtk.
One question is however why you want all events. About naming and readability I think a "unacked_motion_count" instead of just "motion_count" here would be more appropriate.

Regards,
  Frediano


Il giorno lun 25 apr 2022 alle ore 07:46 Walter Mitty <waltermitty121906@xxxxxxxxx> ha scritto:
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.


[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]