Explicitly set canvas cursor to show up on remote desktop.

This commit is contained in:
Ylian Saint-Hilaire 2019-02-06 12:05:55 -08:00
parent 86b5e4a85d
commit ea0068685b
9 changed files with 8 additions and 6 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1604,7 +1604,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
// Generate a 8 digit integer with even random probability for each value.
function getRandomEightDigitInteger() {
var bigInt;
do { bigInt = obj.parent.crypto.randomBytes(4).readUInt32BE(0); } while (bigInt > 4200000000);
do { bigInt = obj.parent.crypto.randomBytes(4).readUInt32BE(0); } while (bigInt >= 4200000000);
return bigInt % 100000000;
}

View File

@ -1,6 +1,6 @@
{
"name": "meshcentral",
"version": "0.2.7-j",
"version": "0.2.7-k",
"keywords": [
"Remote Management",
"Intel AMT",

View File

@ -70,6 +70,7 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
obj.xxStateChange = function (newstate) {
if (obj.State == newstate) return;
obj.State = newstate;
obj.CanvasId.style.cursor = 'default';
//console.log('xxStateChange', newstate);
switch (newstate) {
case 0: {

View File

@ -68,9 +68,9 @@ var CreateAmtRemoteDesktop = function (divid, scrolldiv) {
obj.canvas.fillRect(0, 0, obj.width, obj.height);
obj.canvas.canvas.width = obj.rwidth = obj.width = 640;
obj.canvas.canvas.height = obj.rheight = obj.height = 400;
QS(obj.canvasid).cursor = 'auto';
QS(obj.canvasid).cursor = 'default';
} else {
if (!obj.showmouse) { QS(obj.canvasid).cursor = 'none'; }
QS(obj.canvasid).cursor = obj.showmouse ?'default':'none';
}
}

View File

@ -60,7 +60,7 @@ var CreateAmtRedirect = function (module, authCookie) {
}
obj.xxOnMessage = function (e) {
if (obj.debugmode == 1) { console.log('Recv', e.data); }
//if (obj.debugmode == 1) { console.log('Recv', e.data); }
obj.inDataCount++;
if (typeof e.data == 'object') {
var f = new FileReader();
@ -88,6 +88,7 @@ var CreateAmtRedirect = function (module, authCookie) {
};
obj.xxOnSocketData = function (data) {
//if (obj.debugmode == 1) { console.log('Recv', data.length, rstr2hex(data)); }
if (!data || obj.connectstate == -1) return;
if (typeof data === 'object') {
@ -249,7 +250,7 @@ var CreateAmtRedirect = function (module, authCookie) {
obj.xxSend = function (x) {
//obj.Debug("Redir Send(" + x.length + "): " + rstr2hex(x));
if (obj.socket != null && obj.socket.readyState == WebSocket.OPEN) {
if (obj.debugmode == 1) { console.log('Send', x); }
//if (obj.debugmode == 1) { console.log('Send', x.length, rstr2hex(x)); }
var b = new Uint8Array(x.length);
for (var i = 0; i < x.length; ++i) { b[i] = x.charCodeAt(i); }
obj.socket.send(b.buffer);