Don't send SetDesktopSize too early
We don't know the server layout yet, so we can't preserve the screen id or flags yet at this point. Move it until after we've parsed everything.
This commit is contained in:
parent
12d2e7832d
commit
45cedea78f
16
core/rfb.js
16
core/rfb.js
|
@ -2726,14 +2726,6 @@ export default class RFB extends EventTargetMixin {
|
|||
const firstUpdate = !this._supportsSetDesktopSize;
|
||||
this._supportsSetDesktopSize = true;
|
||||
|
||||
// Normally we only apply the current resize mode after a
|
||||
// window resize event. However there is no such trigger on the
|
||||
// initial connect. And we don't know if the server supports
|
||||
// resizing until we've gotten here.
|
||||
if (firstUpdate) {
|
||||
this._requestRemoteResize();
|
||||
}
|
||||
|
||||
this._sock.rQskipBytes(1); // number-of-screens
|
||||
this._sock.rQskipBytes(3); // padding
|
||||
|
||||
|
@ -2783,6 +2775,14 @@ export default class RFB extends EventTargetMixin {
|
|||
this._resize(this._FBU.width, this._FBU.height);
|
||||
}
|
||||
|
||||
// Normally we only apply the current resize mode after a
|
||||
// window resize event. However there is no such trigger on the
|
||||
// initial connect. And we don't know if the server supports
|
||||
// resizing until we've gotten here.
|
||||
if (firstUpdate) {
|
||||
this._requestRemoteResize();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue