summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeni42 <felsodaniel@gmail.com>2018-01-05 12:05:17 +0100
committerSamuel Mannehed <samuel@cendio.se>2018-01-05 12:05:17 +0100
commit37c609359ab3606cba2b233611adce029a84ac01 (patch)
tree6fd8486622bb4e06480dea8627b5807af7d8e692
parent1f9d0cb12f01524bf2fd17c0ae1c6933fdbcf728 (diff)
downloadnovnc-37c609359ab3606cba2b233611adce029a84ac01.tar.gz
Fix view_only setting with autoconnect (#985)
updateVisualState() and updateViewOnly() requires an initiated UI.rfb reference, the calls in connect() was made too early.
-rw-r--r--app/ui.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/ui.js b/app/ui.js
index f410c5d..ead08e5 100644
--- a/app/ui.js
+++ b/app/ui.js
@@ -1019,10 +1019,6 @@ var UI = {
UI.closeAllPanels();
UI.closeConnectPanel();
- UI.updateVisualState('connecting');
-
- UI.updateViewOnly();
-
var url;
url = UI.getSetting('encrypt') ? 'wss' : 'ws';
@@ -1048,6 +1044,9 @@ var UI = {
UI.rfb.clipViewport = UI.getSetting('view_clip');
UI.rfb.scaleViewport = UI.getSetting('resize') === 'scale';
UI.rfb.resizeSession = UI.getSetting('resize') === 'remote';
+
+ UI.updateVisualState('connecting');
+ UI.updateViewOnly();
},
disconnect: function() {