Added support for remote desktop cursors.

This commit is contained in:
Ylian Saint-Hilaire 2019-09-19 17:24:05 -07:00
parent 0b7452abd8
commit f202352698
3 changed files with 12 additions and 3 deletions

View File

@ -60,8 +60,8 @@
<Compile Include="agents\modules_meshcore\amt-wsman.js" />
<Compile Include="agents\modules_meshcore\amt-xml.js" />
<Compile Include="agents\modules_meshcore\amt.js" />
<Compile Include="agents\modules_meshcore\apfclient.js" />
<Compile Include="agents\modules_meshcore\identifiers.js" />
<Compile Include="agents\modules_meshcore\linux-dbus.js" />
<Compile Include="agents\modules_meshcore\monitor-border.js" />
<Compile Include="agents\modules_meshcore\power-monitor.js" />
<Compile Include="agents\modules_meshcore\smbios.js" />
@ -139,6 +139,7 @@
<Content Include="agents\meshagent_arm-linaro" />
<Content Include="agents\meshagent_arm64" />
<Content Include="agents\meshagent_armhf" />
<Content Include="agents\meshagent_mips" />
<Content Include="agents\meshagent_osx-x86-64" />
<Content Include="agents\meshagent_pogo" />
<Content Include="agents\meshagent_poky" />

View File

@ -1,6 +1,6 @@
{
"name": "meshcentral",
"version": "0.4.0-w",
"version": "0.4.0-y",
"keywords": [
"Remote Management",
"Intel AMT",

View File

@ -57,6 +57,8 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
obj.onDisplayinfo = null;
obj.accumulator = null;
var mouseCursors = ['default', 'progress', 'crosshair', 'pointer', 'help', 'text', 'no-drop', 'move', 'nesw-resize', 'ns-resize', 'nwse-resize', 'w-resize', 'alias', 'wait', 'none'];
obj.Start = function () {
obj.State = 0;
obj.accumulator = null;
@ -213,7 +215,7 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
jumboAdd = 8;
}
if ((cmdsize != str.length) && (obj.debugmode > 0)) { console.log(cmdsize, str.length, cmdsize == str.length); }
if ((command >= 18) && (command != 65)) { console.error("Invalid KVM command " + command + " of size " + cmdsize); console.log("Invalid KVM data", str.length, rstr2hex(str.substring(0, 40)) + '...'); return; }
if ((command >= 18) && (command != 65) && (command != 88)) { console.error("Invalid KVM command " + command + " of size " + cmdsize); console.log("Invalid KVM data", str.length, rstr2hex(str.substring(0, 40)) + '...'); return; }
if (cmdsize > str.length) {
//console.log('KVM accumulator set to ' + str.length + ' bytes, need ' + cmdsize + ' bytes.');
obj.accumulator = str;
@ -296,6 +298,12 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
console.log('KVM: ' + str.substring(1));
}
break;
case 88: // MNG_KVM_MOUSE_CURSOR
if (cmdsize != 5) break;
var cursorNum = str.charCodeAt(4);
if (cursorNum > mouseCursors.length) { cursorNum = 0; }
obj.CanvasId.style.cursor = mouseCursors[cursorNum];
break;
}
return cmdsize + jumboAdd;
}