1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

spice-html5 updated.

This commit is contained in:
catborise 2018-08-08 14:00:35 +03:00
parent 12c80c5021
commit b05a252d7c
36 changed files with 1356 additions and 1415 deletions

20
static/js/spice-html5/resize.js Normal file → Executable file
View file

@ -33,17 +33,29 @@
function resize_helper(sc)
{
var w = document.getElementById(sc.screen_id).clientWidth;
var h = document.getElementById(sc.screen_id).clientHeight;
var m = document.getElementById(sc.message_id);
/* Resize vertically; basically we leave a 20 pixel margin
at the bottom, and use the position of the message window
to figure out how to resize */
var hd = window.innerHeight - m.offsetHeight - m.offsetTop - 20;
var h = window.innerHeight - 20;
/* Screen height based on debug console visibility */
if (window.getComputedStyle(m).getPropertyValue("display") == 'none')
{
/* Get console height from spice.css .spice-message */
var mh = parseInt(window.getComputedStyle(m).getPropertyValue("height"), 10);
h = h - mh;
}
else
{
/* Show both div elements - spice-area and message-div */
h = h - m.offsetHeight - m.clientHeight;
}
/* Xorg requires height be a multiple of 8; round up */
h = h + hd;
if (h % 8 > 0)
h += (8 - (h % 8));