From 37c609359ab3606cba2b233611adce029a84ac01 Mon Sep 17 00:00:00 2001 From: Deni42 Date: Fri, 5 Jan 2018 12:05:17 +0100 Subject: [PATCH] Fix view_only setting with autoconnect (#985) updateVisualState() and updateViewOnly() requires an initiated UI.rfb reference, the calls in connect() was made too early. --- app/ui.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/ui.js b/app/ui.js index f410c5db..ead08e54 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() {