restore focus to orignal window
This commit is contained in:
parent
53c16e7063
commit
f1c0ab6dbb
|
@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
### Added
|
||||
|
||||
- Restore focus to previous window when closing banner
|
||||
- Responsive image
|
||||
|
||||
### Fixed
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue