From: Dietmar Maurer Date: Thu, 7 Aug 2014 07:53:21 +0000 (+0200) Subject: improve resize for firefox X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=1bcafb21bda4c5c58709325c9994d45d4799e61b;p=novnc-pve.git improve resize for firefox --- diff --git a/pveui.js b/pveui.js index 6deff28..7890cf0 100644 --- a/pveui.js +++ b/pveui.js @@ -505,8 +505,10 @@ sizeUpdateTimer: undefined, updateFBSize: function(rfb, width, height) { try { - UI.lastFBWidth = width + 2; - UI.lastFBHeight = height + 6; + // 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 + 6)/2)*2; if (UI.sizeUpdateTimer !== undefined) { clearInterval(UI.sizeUpdateTimer);