From 93bccbc1d2e4448e49cad974bfdcc1b4e24b7d7b Mon Sep 17 00:00:00 2001 From: Philippe Capdepuy Date: Wed, 2 Oct 2019 23:38:51 +0200 Subject: [PATCH] flip display only if tab is visible (fixes memory leak on inactive tab), fixes issue #1302 --- core/rfb.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/rfb.js b/core/rfb.js index dfcab7c6..e972affa 100644 --- a/core/rfb.js +++ b/core/rfb.js @@ -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 }