runningStatus = 'none';
suspended = false;
windowList: Electron.BrowserWindow[] = [];
+ inQuit = false;
constructor(options: RuntimeOption) {
if (options.launchMode == 'backgroundAtStartup') {
}
suspend() {
+ if (this.suspended)
+ return;
console.log('WebApplication : suspend');
addonManager.emit('lcSuspend', this.mainWindow.id);
this.suspended = true;
this.windowList[this.windowList.length - 1].hide();
this.flushData();
- if (!this.backgroundRunnable()) {
+ if (!this.backgroundRunnable() || this.inQuit) {
if (!this.multitaskingSupport) {
// FIXME : terminate app after visibilitychange event handling
setTimeout(() => {
quit() {
console.log('WebApplication : quit');
addonManager.emit('lcQuit', this.mainWindow.id);
+ this.inQuit = true;
+ if (!this.suspended)
+ this.suspend();
}
private flushData() {