vnc: add support for extended desktop resize

The extended desktop resize encoding adds support for (a) clients
sending resize requests to the server, and (b) multihead support.

This patch implements (a).  All resize requests are rejected by qemu.
Qemu can't resize the framebuffer on its own, this is in the hands of
the guest, so all qemu can do is forward the request to the guest.
Should the guest actually resize the framebuffer we can notify the vnc
client later with a separate message.

This requires support in the display device.  Works with virtio-gpu.

https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#extendeddesktopsize-pseudo-encoding

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20210112134120.2031837-4-kraxel@redhat.com
This commit is contained in:
Gerd Hoffmann 2021-01-12 14:41:20 +01:00
parent 9e1632ad07
commit 763deea7e9
2 changed files with 65 additions and 1 deletions

View file

@ -444,6 +444,7 @@ enum {
enum VncFeatures {
VNC_FEATURE_RESIZE,
VNC_FEATURE_RESIZE_EXT,
VNC_FEATURE_HEXTILE,
VNC_FEATURE_POINTER_TYPE_CHANGE,
VNC_FEATURE_WMVI,
@ -459,6 +460,7 @@ enum VncFeatures {
};
#define VNC_FEATURE_RESIZE_MASK (1 << VNC_FEATURE_RESIZE)
#define VNC_FEATURE_RESIZE_EXT_MASK (1 << VNC_FEATURE_RESIZE_EXT)
#define VNC_FEATURE_HEXTILE_MASK (1 << VNC_FEATURE_HEXTILE)
#define VNC_FEATURE_POINTER_TYPE_CHANGE_MASK (1 << VNC_FEATURE_POINTER_TYPE_CHANGE)
#define VNC_FEATURE_WMVI_MASK (1 << VNC_FEATURE_WMVI)