Red Hat Bugzilla – Bug 1312379
[RFE] Spice: reimplement autoresize option in virt-viewer
Last modified: 2018-01-30 07:15:43 EST
In earlier versions of virt-viewer users had the choice of disabling autoresize. This option is useful when users want to work in windowed mode. At virt-viewer startup this is mostly respected, but when the client display is not large enough, the window is reduced in size, and still provokes a screen resize on the VM.
This behaviour is not always desired, and the autoresize option did mostly what was expected.
Users have started to use the previously available option, and now want to be able to continue using it.
The autoresize is a user option, stored on the OS level, not tied to any VM, not tied to the RHEV manager.
With autoresize on:
At startup, the virt-viewer window gets the size of the display of the VM
When the client display is too small at startup, don't send resize instructions to VM, but fail back to autoresize=off, and scrollbars appear
When user resizes the window, size is sent to VM, which adjusts display settings
When user explicitely sets the display resolution inside the VM, autoresize should fall back to autoresize=off
When full screen is requested, adjust remote screen size to local screen size
With autoresize off:
Resizing the window never sends resize instructions to the VM.
When the VM display size is too large, display scrollbars on the client window
When the VM display size is smaller, ask if user wants to switch back to autoresize and resize VM display, or resize client window back to optimal size.
When full screen is requested, ask if user wants to switch back to autoresize, or scale the contents of the remote screen to match screen size
Basic idea is that, when 'autoresize=on' is set, the VM settings are respected. With 'autoresize=off' the VM settings are respected.
When virt-viewer is switched to full screen, it seems to be useful to scale the display (which may blurr the screen contents)
When the VM settings are set explicitely, we should honour this from the client. When this is set from the virt-viewer side, after confirmation only (as resizing a window is a lot more common operation) we do switch back to autoresize=on.