flip display only if tab is visible (fixes memory leak on inactive tab), fixes issue #1302

This commit is contained in:
Philippe Capdepuy 2019-10-02 23:38:51 +02:00 committed by GitHub
parent 412d93060d
commit 93bccbc1d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -1483,7 +1483,10 @@ export default class RFB extends EventTargetMixin {
this._FBU.encoding = null;
}
this._display.flip();
if (!document.hidden) {
this._display.flip();
}
return true; // We finished this FBU
}