}
suspend() {
console.log('WebApplication : suspend');
- if (!this.backgroundSupport) {
- BrowserWindow.getAllWindows().forEach((window) => {
+ BrowserWindow.getAllWindows().forEach((window) => {
+ window.hide();
+ if (!this.backgroundSupport)
window.setEnabled(false);
- });
- }
+ });
}
resume() {
console.log('WebApplication : resume');
if (!this.firstRendered) {
return;
}
- if (!this.backgroundSupport) {
- BrowserWindow.getAllWindows().forEach((window) => {
+ BrowserWindow.getAllWindows().forEach((window) => {
+ window.show();
+ if (!this.backgroundSupport)
window.setEnabled(true);
- });
- }
+ });
}
}
module.exports = WebApplication;