if (this.suspended || this.inQuit)
return;
console.log('WebApplication : suspend');
- addonManager.emit('lcSuspend', this.mainWindow.id);
this.suspended = true;
- if (this.windowList.length > 0)
+ if (this.windowList.length > 0) {
+ addonManager.emit('lcSuspend', this.mainWindow.id);
this.windowList[this.windowList.length - 1].hide();
+ }
this.flushData();
if (!this.backgroundRunnable()) {
if (!this.multitaskingSupport) {
finalize() {
console.log('WebApplication : finalize');
this.flushData();
- this.windowList.forEach((window) => window.removeAllListeners());
+ this.windowList.forEach((window) => {
+ window.removeAllListeners();
+ window.setEnabled(false);
+ });
this.inQuit = false;
if (!this.suspended)
this.suspend();
quit() {
console.log('WebApplication : quit');
- addonManager.emit('lcQuit', this.mainWindow.id);
+ if (this.windowList.length > 0)
+ addonManager.emit('lcQuit', this.mainWindow.id);
if (wrt.tv) {
this.inspectorSrc = '';
wrt.tv.cancelDialogs(this.mainWindow.webContents);