From 19f4f4582873db8c7b0067896dd0c8d31e3f23e4 Mon Sep 17 00:00:00 2001 From: "surya.kumar7" Date: Wed, 6 Feb 2019 17:34:05 +0530 Subject: [PATCH] Remove redundant Window hide on suspend as it is handled by platform JSWRT need not explicitly call window.hide() during App loop's suspend event as platform is directly responsible for that Change-Id: I9f91fed65f373f5fbbab12588660a8d04bea3524 Signed-off-by: surya.kumar7 --- wrt_app/src/web_application.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/wrt_app/src/web_application.js b/wrt_app/src/web_application.js index e3cf6da..8c04e1b 100755 --- a/wrt_app/src/web_application.js +++ b/wrt_app/src/web_application.js @@ -86,22 +86,22 @@ class WebApplication { } suspend() { console.log('WebApplication : suspend'); - BrowserWindow.getAllWindows().forEach((window) => { - window.hide(); - if (!this.backgroundSupport) + if (!this.backgroundSupport) { + BrowserWindow.getAllWindows().forEach((window) => { window.setEnabled(false); - }); + }); + } } resume() { console.log('WebApplication : resume'); if (!this.firstRendered) { return; } - BrowserWindow.getAllWindows().forEach((window) => { - window.show(); - if (!this.backgroundSupport) + if (!this.backgroundSupport) { + BrowserWindow.getAllWindows().forEach((window) => { window.setEnabled(true); - }); + }); + } } } module.exports = WebApplication; -- 2.7.4