this.handleEvents(winopt);
this.firstRendered = false;
this.backgroundSupport = wrt.getBackgroundSupport();
+ this.multitaskingSupport = wrt.getMultitaskingSupport();
}
getBrowserWindowOption() {
return {
}
suspend() {
console.log('WebApplication : suspend');
- BrowserWindow.getAllWindows().forEach((window) => {
- window.hide();
- if (!this.backgroundSupport)
- window.setEnabled(false);
- });
+ let windows = BrowserWindow.getAllWindows();
+ windows.forEach((window) => window.hide());
+ if (!this.multitaskingSupport) {
+ console.log('multitasking is not supported; quitting app')
+ app.quit();
+ } else if (!this.backgroundSupport) {
+ windows.forEach((window) => window.setEnabled(false));
+ }
}
resume() {
console.log('WebApplication : resume');