it already was in the comment but i forgot it:
some browsers need an even size,
so we do Floor(x/2)*2
but if we have an uneven height, we get a window
that is a pixel too small, resulting in a scrollbar
so we have to add 1 first (like with the width)
Floor((x+1)/2)*2
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
+ // Note1: CSS Canvas size is wrong by a few pixels in Chrome
+ // Note2: window size must be even number for firefox
+ UI.lastFBWidth = Math.floor((width + 1)/2)*2;;
-+ UI.lastFBHeight = Math.floor((height)/2)*2;
++ UI.lastFBHeight = Math.floor((height + 1)/2)*2;
+
+ if (UI.sizeUpdateTimer !== undefined) {
+ clearInterval(UI.sizeUpdateTimer);