From c7c6cb196dc73c6f765f447dbfbf3a6384a9a27e Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Thu, 7 Sep 2017 17:16:16 +0200 Subject: [PATCH] Remove rect arguments onFBUComplete callback This callback is for an entire FBU, so it's not really relevant to include info about just a single of the included rects. --- core/rfb.js | 10 +++------- tests/test.rfb.js | 1 - 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/core/rfb.js b/core/rfb.js index caad72ce..35ee62ba 100644 --- a/core/rfb.js +++ b/core/rfb.js @@ -137,8 +137,8 @@ export default function RFB(defaults) { 'onPasswordRequired': function () { }, // onPasswordRequired(rfb, msg): VNC password is required 'onClipboard': function () { }, // onClipboard(rfb, text): RFB clipboard contents received 'onBell': function () { }, // onBell(rfb): RFB Bell message received - 'onFBUReceive': function () { }, // onFBUReceive(rfb, fbu): RFB FBU received but not yet processed - 'onFBUComplete': function () { }, // onFBUComplete(rfb, fbu): RFB FBU received and processed + 'onFBUReceive': function () { }, // onFBUReceive(rfb, rect): RFB FBU rect received but not yet processed + 'onFBUComplete': function () { }, // onFBUComplete(rfb): RFB FBU received and processed 'onFBResize': function () { }, // onFBResize(rfb, width, height): frame buffer resized 'onDesktopName': function () { }, // onDesktopName(rfb, name): desktop name received 'onXvpInit': function () { } // onXvpInit(version): XVP extensions active for this connection @@ -1409,11 +1409,7 @@ RFB.prototype = { this._display.flip(); - this._onFBUComplete(this, - {'x': this._FBU.x, 'y': this._FBU.y, - 'width': this._FBU.width, 'height': this._FBU.height, - 'encoding': this._FBU.encoding, - 'encodingName': encodingName(this._FBU.encoding)}); + this._onFBUComplete(this); return true; // We finished this FBU }, diff --git a/tests/test.rfb.js b/tests/test.rfb.js index 116b4213..a6d4a0d0 100644 --- a/tests/test.rfb.js +++ b/tests/test.rfb.js @@ -1335,7 +1335,6 @@ describe('Remote Frame Buffer Protocol Client', function() { var spy = client.get_onFBUComplete(); expect(spy).to.have.been.calledOnce; - expect(spy).to.have.been.calledWith(sinon.match.any, rect_info); }); it('should not fire onFBUComplete if we have not finished processing the update', function () {