On Fri, Apr 18, 2025 at 01:29:51PM +0200, Dietmar Maurer wrote: ...the $SUBJECT says what it does, but the comment message ought to describe why it is doing this too.
> Signed-off-by: Dietmar Maurer <diet...@proxmox.com> > --- > ui/vnc.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/ui/vnc.c b/ui/vnc.c > index feab4c0043..6db03a1550 100644 > --- a/ui/vnc.c > +++ b/ui/vnc.c > @@ -3222,6 +3222,7 @@ static void vnc_refresh(DisplayChangeListener *dcl) > VncDisplay *vd = container_of(dcl, VncDisplay, dcl); > VncState *vs, *vn; > int has_dirty, rects = 0; > + bool keep_dirty = false; > > if (QTAILQ_EMPTY(&vd->clients)) { > update_displaychangelistener(&vd->dcl, VNC_REFRESH_INTERVAL_MAX); > @@ -3249,6 +3250,9 @@ static void vnc_refresh(DisplayChangeListener *dcl) > vs->h264->keep_dirty--; > } > } > + if (vs->h264->keep_dirty > 0) { > + keep_dirty = true; > + } > } > > int count = vnc_update_client(vs, client_dirty); > @@ -3266,7 +3270,7 @@ static void vnc_refresh(DisplayChangeListener *dcl) > /* vs might be free()ed here */ > } > > - if (has_dirty && rects) { > + if ((has_dirty && rects) || keep_dirty) { > vd->dcl.update_interval /= 2; > if (vd->dcl.update_interval < VNC_REFRESH_INTERVAL_BASE) { > vd->dcl.update_interval = VNC_REFRESH_INTERVAL_BASE; > -- > 2.39.5 > > 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 :|