mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-html5
synced 2025-12-25 20:31:22 +00:00
resize_helper, no message box case
The resize_handler need to check for the existence of the message box before computing it's size. Signed-off-by: Jeremy White <jwhite@codeweavers.com>
This commit is contained in:
parent
ee0ec7c24f
commit
7b8f595b8f
@ -42,16 +42,19 @@ function resize_helper(sc)
|
||||
var h = window.innerHeight - 20;
|
||||
|
||||
/* Screen height based on debug console visibility */
|
||||
if (window.getComputedStyle(m).getPropertyValue("display") == 'none')
|
||||
if (m != null)
|
||||
{
|
||||
/* 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;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user