}
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;