From b4ff032e201fde7a3ebd7a48968fdc268c09d230 Mon Sep 17 00:00:00 2001 From: Solly Ross Date: Sun, 26 Feb 2017 16:50:54 -0500 Subject: [PATCH] Fix view_only clipboard handling We need to actually consume the clipboard event message, even if we don't act on it. --- core/rfb.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/rfb.js b/core/rfb.js index 55ca2275..669c817e 100644 --- a/core/rfb.js +++ b/core/rfb.js @@ -1188,7 +1188,6 @@ RFB.prototype = { _handle_server_cut_text: function () { Log.Debug("ServerCutText"); - if (this._view_only) { return true; } if (this._sock.rQwait("ServerCutText header", 7, 1)) { return false; } this._sock.rQskipBytes(3); // Padding @@ -1196,6 +1195,9 @@ RFB.prototype = { if (this._sock.rQwait("ServerCutText", length, 8)) { return false; } var text = this._sock.rQshiftStr(length); + + if (this._view_only) { return true; } + this._onClipboard(this, text); return true;