From: surya.kumar7 Date: Wed, 6 Feb 2019 12:04:05 +0000 (+0530) Subject: Remove redundant Window hide on suspend as it is handled by platform X-Git-Tag: submit/tizen/20190212.024052^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=19f4f4582873db8c7b0067896dd0c8d31e3f23e4;p=platform%2Fframework%2Fweb%2Fwrtjs.git 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 --- diff --git a/wrt_app/src/web_application.js b/wrt_app/src/web_application.js index e3cf6dac..8c04e1b6 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;