From 94c67f501fbcfca88f34867255ad08851b862f8d Mon Sep 17 00:00:00 2001 From: Kasm <44181855+kasmtech@users.noreply.github.com> Date: Wed, 21 Apr 2021 20:04:25 -0400 Subject: [PATCH 1/2] Remove istouch variable --- core/rfb.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/core/rfb.js b/core/rfb.js index 0823b991..f5bd4e92 100644 --- a/core/rfb.js +++ b/core/rfb.js @@ -1940,13 +1940,6 @@ export default class RFB extends EventTargetMixin { encs.push(encodings.pseudoEncodingCursor); } - //if (supportsCursorURIs() && this._fb_depth == 24){ - // Allow the user to attempt using a local cursor even if they are using a touch device. KASM-395 - if (this.preferLocalCursor || !isTouchDevice){ - encs.push(encodings.pseudoEncodingCursor) - } - //} - RFB.messages.clientEncodings(this._sock, encs); } From c02aca5c137c81d74e84c44a45dfad0514666a01 Mon Sep 17 00:00:00 2001 From: Kasm <44181855+kasmtech@users.noreply.github.com> Date: Thu, 22 Apr 2021 08:37:43 -0400 Subject: [PATCH 2/2] restoring behavior of KasmVNC --- core/rfb.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/rfb.js b/core/rfb.js index f5bd4e92..db774e12 100644 --- a/core/rfb.js +++ b/core/rfb.js @@ -10,7 +10,7 @@ import { toUnsigned32bit, toSigned32bit } from './util/int.js'; import * as Log from './util/logging.js'; import { encodeUTF8, decodeUTF8 } from './util/strings.js'; -import { dragThreshold } from './util/browser.js'; +import { dragThreshold, supportsCursorURIs, isTouchDevice } from './util/browser.js'; import { clientToElement } from './util/element.js'; import { setCapture } from './util/events.js'; import EventTargetMixin from './util/eventtarget.js'; @@ -1935,9 +1935,11 @@ export default class RFB extends EventTargetMixin { if (this.preferBandwidth) // must be last - server processes in reverse order encs.push(encodings.pseudoEncodingPreferBandwidth); - if (this._fbDepth == 24) { - encs.push(encodings.pseudoEncodingVMwareCursor); - encs.push(encodings.pseudoEncodingCursor); + if (supportsCursorURIs && this._fbDepth == 24) { + if (this.preferLocalCursor || !isTouchDevice) { + encs.push(encodings.pseudoEncodingVMwareCursor); + encs.push(encodings.pseudoEncodingCursor); + } } RFB.messages.clientEncodings(this._sock, encs);