Don't request a new desktop size in view_only
This commit is contained in:
parent
81bd2d6682
commit
7ae53db9cd
|
@ -1084,11 +1084,11 @@ var UI;
|
|||
display.set_maxWidth(screen.w);
|
||||
display.set_maxHeight(screen.h);
|
||||
|
||||
Util.Debug('Attempting requestDesktopSize(' +
|
||||
screen.w + ', ' + screen.h + ')');
|
||||
|
||||
// Request a remote size covering the viewport
|
||||
UI.rfb.requestDesktopSize(screen.w, screen.h);
|
||||
if (UI.rfb.requestDesktopSize(screen.w, screen.h)) {
|
||||
Util.Debug('Requested new desktop size: ' +
|
||||
screen.w + 'x' + screen.h);
|
||||
}
|
||||
}, 500);
|
||||
|
||||
} else if (resizeMode === 'scale' || resizeMode === 'downscale') {
|
||||
|
|
|
@ -339,12 +339,18 @@
|
|||
// 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) {
|
||||
if (this._rfb_connection_state !== 'connected') { return; }
|
||||
if (this._rfb_connection_state !== 'connected' ||
|
||||
this._view_only) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._supportsSetDesktopSize) {
|
||||
RFB.messages.setDesktopSize(this._sock, width, height,
|
||||
this._screen_id, this._screen_flags);
|
||||
this._sock.flush();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue