restore focus to orignal window

This commit is contained in:
2021-05-28 21:05:12 +02:00
parent 53c16e7063
commit f1c0ab6dbb
2 changed files with 5 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
import { join } from 'path'
import os from 'os'
import { BrowserWindow, BrowserWindowConstructorOptions, ipcMain } from 'electron'
import { app, BrowserWindow, BrowserWindowConstructorOptions, ipcMain } from 'electron'
import dayjs from 'dayjs'
import logger from 'electron-log'
import ms from 'ms'
@@ -64,6 +64,9 @@ export default class Banner {
static close() {
if (this.window) {
Settings.save('lastRun', Date.now())
this.window.minimize()
this.window.hide()
if (process.platform === 'darwin') app.hide()
this.window.close()
this.window = null
}