ui: avoid sending framebuffer updates outside client desktop bounds
commit55b400497cf9c79acbb5c01abc58737bc52c081c
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 11 Mar 2021 18:29:55 +0000 (11 18:29 +0000)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 15 Mar 2021 16:37:50 +0000 (15 17:37 +0100)
tree756c926530dfacb3898f51ada0712bbd6ab1bd93
parentadc8fce871afd30b4bf13cf5440a96a3ffb486db
ui: avoid sending framebuffer updates outside client desktop bounds

We plan framebuffer update rects based on the VNC server surface. If the
client doesn't support desktop resize, then the client bounds may differ
from the server surface bounds. VNC clients may become upset if we then
send an update message outside the bounds of the client desktop.

This takes the approach of clamping the rectangles from the worker
thread immediately before sending them. This may sometimes results in
sending a framebuffer update message with zero rectangles.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210311182957.486939-3-berrange@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/trace-events
ui/vnc-jobs.c