diff --git a/public/scripts/agent-desktop-0.0.2.js b/public/scripts/agent-desktop-0.0.2.js index 4d53e76f..7f434d6f 100644 --- a/public/scripts/agent-desktop-0.0.2.js +++ b/public/scripts/agent-desktop-0.0.2.js @@ -216,6 +216,7 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) { } } + console.log('cmd', cmd); switch (cmd) { case 3: // Tile if (obj.FirstDraw) obj.onResize(); @@ -273,7 +274,7 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) { break; case 87: // MNG_KVM_INPUT_LOCK if (cmdsize != 5) break; - if (obj.RemoteInputLock != (view[4] != 0)) { + if ((obj.RemoteInputLock == null) || (obj.RemoteInputLock !== (view[4] != 0))) { obj.RemoteInputLock = (view[4] != 0); if (obj.onRemoteInputLockChanged) { obj.onRemoteInputLockChanged(obj, obj.RemoteInputLock); } } diff --git a/views/default.handlebars b/views/default.handlebars index 6367751b..e7951c88 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -7435,7 +7435,7 @@ if (desktop && desktop.m.mouseCursorActive) { desktop.m.mouseCursorActive(true); } QV('DeskInputLockedButton', desktop.m.RemoteInputLock === 1); QV('DeskInputUnLockedButton', desktop.m.RemoteInputLock === 0); - desktop.m.onRemoteInputLockChanged = function(obj, state) { QV('DeskInputLockedButton', state === 1); QV('DeskInputUnLockedButton', state === 0); } + desktop.m.onRemoteInputLockChanged = function(obj, state) { QV('DeskInputLockedButton', state); QV('DeskInputUnLockedButton', !state); } desktopNode = currentNode; onDesktopStateChange(desktop, desktop.State); delete multiDesktop[currentNode._id]; @@ -7650,7 +7650,7 @@ if (tsid != null) { desktop.options.tsid = tsid; } if (consent != null) { desktop.options.consent = consent; } desktop.onStateChanged = onDesktopStateChange; - desktop.m.onRemoteInputLockChanged = function(obj, state) { QV('DeskInputLockedButton', state === 1); QV('DeskInputUnLockedButton', state === 0); } + desktop.m.onRemoteInputLockChanged = function(obj, state) { QV('DeskInputLockedButton', state); QV('DeskInputUnLockedButton', !state); } desktop.onConsoleMessageChange = function () { if (desktop.consoleMessage) { Q('p11DeskConsoleMsg').innerHTML += formatAgentConsoleMessage(desktop.consoleMessage, desktop.consoleMessageId, desktop.consoleMessageArgs);