Remove some unused return values

This commit is contained in:
Pierre Ossman 2017-10-20 12:57:34 +02:00
parent 4f90c1d387
commit 15a6269510
1 changed files with 10 additions and 17 deletions

View File

@ -298,7 +298,6 @@ RFB.prototype = {
this._rfb_init_state = ''; this._rfb_init_state = '';
this._updateConnectionState('connecting'); this._updateConnectionState('connecting');
return true;
}, },
disconnect: function () { disconnect: function () {
@ -314,7 +313,7 @@ RFB.prototype = {
}, },
sendCtrlAltDel: function () { sendCtrlAltDel: function () {
if (this._rfb_connection_state !== 'connected' || this._viewOnly) { return false; } if (this._rfb_connection_state !== 'connected' || this._viewOnly) { return; }
Log.Info("Sending Ctrl-Alt-Del"); Log.Info("Sending Ctrl-Alt-Del");
this.sendKey(KeyTable.XK_Control_L, "ControlLeft", true); this.sendKey(KeyTable.XK_Control_L, "ControlLeft", true);
@ -323,8 +322,6 @@ RFB.prototype = {
this.sendKey(KeyTable.XK_Delete, "Delete", false); this.sendKey(KeyTable.XK_Delete, "Delete", false);
this.sendKey(KeyTable.XK_Alt_L, "AltLeft", false); this.sendKey(KeyTable.XK_Alt_L, "AltLeft", false);
this.sendKey(KeyTable.XK_Control_L, "ControlLeft", false); this.sendKey(KeyTable.XK_Control_L, "ControlLeft", false);
return true;
}, },
machineShutdown: function () { machineShutdown: function () {
@ -342,12 +339,12 @@ RFB.prototype = {
// Send a key press. If 'down' is not specified then send a down key // Send a key press. If 'down' is not specified then send a down key
// followed by an up key. // followed by an up key.
sendKey: function (keysym, code, down) { sendKey: function (keysym, code, down) {
if (this._rfb_connection_state !== 'connected' || this._viewOnly) { return false; } if (this._rfb_connection_state !== 'connected' || this._viewOnly) { return; }
if (down === undefined) { if (down === undefined) {
this.sendKey(keysym, code, true); this.sendKey(keysym, code, true);
this.sendKey(keysym, code, false); this.sendKey(keysym, code, false);
return true; return;
} }
var scancode = XtScancode[code]; var scancode = XtScancode[code];
@ -361,13 +358,11 @@ RFB.prototype = {
RFB.messages.QEMUExtendedKeyEvent(this._sock, keysym, down, scancode); RFB.messages.QEMUExtendedKeyEvent(this._sock, keysym, down, scancode);
} else { } else {
if (!keysym) { if (!keysym) {
return false; return;
} }
Log.Info("Sending keysym (" + (down ? "down" : "up") + "): " + keysym); Log.Info("Sending keysym (" + (down ? "down" : "up") + "): " + keysym);
RFB.messages.keyEvent(this._sock, keysym, down ? 1 : 0); RFB.messages.keyEvent(this._sock, keysym, down ? 1 : 0);
} }
return true;
}, },
clipboardPasteFrom: function (text) { clipboardPasteFrom: function (text) {
@ -395,17 +390,15 @@ RFB.prototype = {
requestDesktopSize: function (width, height) { requestDesktopSize: function (width, height) {
if (this._rfb_connection_state !== 'connected' || if (this._rfb_connection_state !== 'connected' ||
this._viewOnly) { this._viewOnly) {
return false; return;
}
if (!this._supportsSetDesktopSize) {
return;
} }
if (this._supportsSetDesktopSize) {
RFB.messages.setDesktopSize(this._sock, width, height, RFB.messages.setDesktopSize(this._sock, width, height,
this._screen_id, this._screen_flags); this._screen_id, this._screen_flags);
this._sock.flush();
return true;
} else {
return false;
}
}, },