Fix view_only clipboard handling

We need to actually consume the clipboard event message,
even if we don't act on it.
This commit is contained in:
Solly Ross 2017-02-26 16:50:54 -05:00
parent c53af3f5f6
commit b4ff032e20
1 changed files with 3 additions and 1 deletions

View File

@ -1188,7 +1188,6 @@ RFB.prototype = {
_handle_server_cut_text: function () { _handle_server_cut_text: function () {
Log.Debug("ServerCutText"); Log.Debug("ServerCutText");
if (this._view_only) { return true; }
if (this._sock.rQwait("ServerCutText header", 7, 1)) { return false; } if (this._sock.rQwait("ServerCutText header", 7, 1)) { return false; }
this._sock.rQskipBytes(3); // Padding this._sock.rQskipBytes(3); // Padding
@ -1196,6 +1195,9 @@ RFB.prototype = {
if (this._sock.rQwait("ServerCutText", length, 8)) { return false; } if (this._sock.rQwait("ServerCutText", length, 8)) { return false; }
var text = this._sock.rQshiftStr(length); var text = this._sock.rQshiftStr(length);
if (this._view_only) { return true; }
this._onClipboard(this, text); this._onClipboard(this, text);
return true; return true;