]> git.proxmox.com Git - mirror_novnc.git/commitdiff
Update clipping before changing scaling
authorSamuel Mannehed <samuel@cendio.se>
Thu, 16 Feb 2017 14:38:58 +0000 (15:38 +0100)
committerSamuel Mannehed <samuel@cendio.se>
Thu, 16 Feb 2017 15:07:55 +0000 (16:07 +0100)
The scaling is relative the current viewport, so we need to make
sure it is correct before changing the scale setting.

app/ui.js

index d4a7555da74375b461070db7475cbc585f8ffd3e..0ea85b337779ada645bf5fc26be824f80081205e 100644 (file)
--- a/app/ui.js
+++ b/app/ui.js
@@ -1220,6 +1220,9 @@ var UI;
                 var resizeMode = UI.getSetting('resize');
                 display.set_scale(1);
 
+                // Make sure the viewport is adjusted first
+                UI.updateViewClip();
+
                 if (resizeMode === 'remote') {
 
                     // Request changing the resolution of the remote display to