Comment different resize functions in rfb.js
Some checks failed
Publish / npm (push) Has been cancelled
Publish / snap (push) Has been cancelled
Lint / eslint (push) Has been cancelled
Lint / html (push) Has been cancelled
Test / test (ChromeHeadless, ubuntu-latest) (push) Has been cancelled
Test / test (ChromeHeadless, windows-latest) (push) Has been cancelled
Test / test (EdgeHeadless, windows-latest) (push) Has been cancelled
Test / test (FirefoxHeadless, ubuntu-latest) (push) Has been cancelled
Test / test (FirefoxHeadless, windows-latest) (push) Has been cancelled
Test / test (Safari, macos-latest) (push) Has been cancelled
Translate / translate (push) Has been cancelled

This commit is contained in:
Samuel Mannehed 2024-12-27 14:48:20 +01:00
parent e6e03a226f
commit 3193f808b5

View File

@ -720,6 +720,7 @@ export default class RFB extends EventTargetMixin {
currentHeight == this._expectedClientHeight; currentHeight == this._expectedClientHeight;
} }
// Handle browser window resizes
_handleResize() { _handleResize() {
// Don't change anything if the client size is already as expected // Don't change anything if the client size is already as expected
if (this._clientHasExpectedSize()) { if (this._clientHasExpectedSize()) {
@ -2872,6 +2873,7 @@ export default class RFB extends EventTargetMixin {
this._fbWidth, this._fbHeight); this._fbWidth, this._fbHeight);
} }
// Handle resize-messages from the server
_resize(width, height) { _resize(width, height) {
this._fbWidth = width; this._fbWidth = width;
this._fbHeight = height; this._fbHeight = height;