mirror of
https://github.com/cupcakearmy/unpixel.git
synced 2024-12-22 08:06:33 +00:00
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
|
### Added
|
||||||
|
|
||||||
|
- Restore focus to previous window when closing banner
|
||||||
- Responsive image
|
- Responsive image
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { join } from 'path'
|
import { join } from 'path'
|
||||||
import os from 'os'
|
import os from 'os'
|
||||||
import { BrowserWindow, BrowserWindowConstructorOptions, ipcMain } from 'electron'
|
import { app, BrowserWindow, BrowserWindowConstructorOptions, ipcMain } from 'electron'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import logger from 'electron-log'
|
import logger from 'electron-log'
|
||||||
import ms from 'ms'
|
import ms from 'ms'
|
||||||
@ -64,6 +64,9 @@ export default class Banner {
|
|||||||
static close() {
|
static close() {
|
||||||
if (this.window) {
|
if (this.window) {
|
||||||
Settings.save('lastRun', Date.now())
|
Settings.save('lastRun', Date.now())
|
||||||
|
this.window.minimize()
|
||||||
|
this.window.hide()
|
||||||
|
if (process.platform === 'darwin') app.hide()
|
||||||
this.window.close()
|
this.window.close()
|
||||||
this.window = null
|
this.window = null
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user