From 0b903af296d6b0626cee53a3b12b0e56d84b02d9 Mon Sep 17 00:00:00 2001 From: Samuel Mannehed Date: Mon, 30 Jul 2018 10:02:44 +0200 Subject: [PATCH] Remove unnecessary code The enableDisableViewClip call in the fullscreen code didn't have any effect and should have been removed when the special case for clipping in IE and Safari fullscreen was removed in b18ef81. The setViewDrag call claimed to disable view drag on UI state change. The UI states are: init, connecting, connected, reconnecting, disconnecting, disconnected The only state where the called function didn't immediately return was "connected" and that's the only state where enabling view drag is possible. Thus it could never have been enabled when changing to the "connected" state. --- app/ui.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/ui.js b/app/ui.js index 4fe2a3fb..552ac287 100644 --- a/app/ui.js +++ b/app/ui.js @@ -432,11 +432,7 @@ const UI = { UI.keepControlbar(); } - // State change disables viewport dragging. - // It is enabled (toggled) by direct click on the button - UI.setViewDrag(false); - - // State change also closes the password dialog + // State change closes the password dialog document.getElementById('noVNC_password_dlg') .classList.remove('noVNC_open'); }, @@ -1204,7 +1200,6 @@ const UI = { document.body.msRequestFullscreen(); } } - UI.enableDisableViewClip(); UI.updateFullscreenButton(); },