On Wed, May 21, 2025 at 05:16:13PM +0200, Juraj Marcin wrote: > From: Juraj Marcin <jmar...@redhat.com> > > If a virtual machine is paused for an extended period time, for example, > due to an incoming migration, there are also no changes on the screen. > VNC in such case increases the display update interval by > VNC_REFRESH_INTERVAL_INC (50 ms). The update interval can then grow up > to VNC_REFRESH_INTERVAL_MAX (3000 ms). > > When the machine resumes, it can then take up to 3 seconds for the first > display update. Furthermore, the update interval is then halved with > each display update with changes on the screen. If there are moving > elements on the screen, such as a video, this can be perceived as > freezing and stuttering for few seconds before the movement is smooth > again. > > This patch resolves this issue, by adding a listener to VM state changes > and changing the update interval when the VM state changes to RUNNING. > The update_displaychangelistener() function updates the internal timer, > and the display is refreshed immediately if the timer is expired. > > Signed-off-by: Juraj Marcin <jmar...@redhat.com> > --- > ui/vnc.c | 12 ++++++++++++ > ui/vnc.h | 2 ++ > 2 files changed, 14 insertions(+)
Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|