[Spice-devel] [PATCH spice-html5] If an agent is attached, enable dynamic resizing of the guest screen.

Gianni Pirozzi germanium at gmx.us
Fri Sep 5 12:00:50 PDT 2014

I tried this patch and observed a great improvement in cursor positioning, thanks!
But I'm confused about dynamic resizing of the guest screen, it seems too tied to the presentation.
I'm using spice-html5 in a web application which has it's own layout replacing spice.html and spice.css, but I'm trying to keep my code apart and leave the distribution without changes.

Ideally I would like to be able to set a size of my choice at instantiation, and control how subsequent resizing are triggered and to what amount (only if the agent is available of course).

I see I can resize the guest screen using the resize_window method and it works, but I can't prevent automatic resizing.
Also I can't understand why the height for automatic resizing is calculated that way (in function resize_helper), but I can see it depends on layout specific sizes like the message element height and position, and the window height.
Wouldn't it be better to move the resize_helper to a layout specific file, e.g. in spice.html?

In my tests with unmodified spice.html (Firefox 31, Windows 7 guests) I ended up many times with the canvas overflowing widely from the screen element. Requesting a resolution that is not among the choices in the Windows guest, sometimes has unpredictable results.


More information about the Spice-devel mailing list