Change clippingDisplay() to a property

It fits much better as a property given that it only tells what the
current state of things are.
This commit is contained in:
Pierre Ossman
2017-10-20 13:03:50 +02:00
parent 15a6269510
commit a80aa41628
6 changed files with 15 additions and 36 deletions
+2 -5
View File
@@ -268,6 +268,8 @@ RFB.prototype = {
get viewport() { return this._display.viewport; },
set viewport(viewport) { this._display.viewport = viewport; },
get isClipped() { return this._display.isClipped; },
// ===== EVENT HANDLERS =====
onupdatestate: function () {}, // onupdatestate(rfb, state, oldstate): connection state change
@@ -380,11 +382,6 @@ RFB.prototype = {
this._display.viewportChangeSize(width, height);
},
clippingDisplay: function () {
if (this._rfb_connection_state !== 'connected') { return false; }
return this._display.clippingDisplay();
},
// Requests a change of remote desktop size. This message is an extension
// and may only be sent if we have received an ExtendedDesktopSize message
requestDesktopSize: function (width, height) {