From 12d2e7832d15d10e6c105c709b86d4adc040548d Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Sun, 4 Jun 2023 14:54:40 +0200 Subject: [PATCH] Properly decode ExtendedDesktopSize fields We are expected to preserve these and use them in our requests back to the server. We can't do that if we don't actually decode them correctly. --- core/rfb.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/rfb.js b/core/rfb.js index b4045e52..d89f029a 100644 --- a/core/rfb.js +++ b/core/rfb.js @@ -2740,12 +2740,12 @@ export default class RFB extends EventTargetMixin { for (let i = 0; i < numberOfScreens; i += 1) { // Save the id and flags of the first screen if (i === 0) { - this._screenID = this._sock.rQshiftBytes(4); // id - this._sock.rQskipBytes(2); // x-position - this._sock.rQskipBytes(2); // y-position - this._sock.rQskipBytes(2); // width - this._sock.rQskipBytes(2); // height - this._screenFlags = this._sock.rQshiftBytes(4); // flags + this._screenID = this._sock.rQshift32(); // id + this._sock.rQskipBytes(2); // x-position + this._sock.rQskipBytes(2); // y-position + this._sock.rQskipBytes(2); // width + this._sock.rQskipBytes(2); // height + this._screenFlags = this._sock.rQshift32(); // flags } else { this._sock.rQskipBytes(16); }