From 7bfcb19ee16d29018f4c9a046bec4c38239e5e62 Mon Sep 17 00:00:00 2001 From: Lauri Kasanen Date: Mon, 29 Mar 2021 13:21:00 +0300 Subject: [PATCH] Fixups --- kasmweb/core/display.js | 2 +- kasmweb/core/rfb.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kasmweb/core/display.js b/kasmweb/core/display.js index cdb9840..46d0861 100644 --- a/kasmweb/core/display.js +++ b/kasmweb/core/display.js @@ -355,7 +355,7 @@ export default class Display { imageRect(x, y, w, h, mime, arr) { /* The internal logic cannot handle empty images, so bail early */ - if ((width === 0) || (height === 0)) { + if ((w === 0) || (h === 0)) { return; } diff --git a/kasmweb/core/rfb.js b/kasmweb/core/rfb.js index cd7d73e..77186e6 100644 --- a/kasmweb/core/rfb.js +++ b/kasmweb/core/rfb.js @@ -79,7 +79,7 @@ export default class RFB extends EventTargetMixin { this._rfbCredentials = options.credentials || {}; this._shared = 'shared' in options ? !!options.shared : true; this._repeaterID = options.repeaterID || ''; - this._wsProtocols = options.wsProtocols || []; + this._wsProtocols = options.wsProtocols || ['binary']; // Internal state this._rfbConnectionState = ''; @@ -1603,7 +1603,7 @@ export default class RFB extends EventTargetMixin { encs.push(encodings.pseudoEncodingCursor); } - if (supportsCursorURIs() && this._fb_depth == 24){ + 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)