Merge pull request #1262 from ehwarren/bugfix/app-crashes-when-clicking-on-systray-icon

bugfix/app-crashes-when-clicking-on-systray-icon
This commit is contained in:
Eugene 2019-07-18 21:41:06 +02:00 committed by GitHub
commit d771bd196c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,7 +72,7 @@ export class Application {
this.tray = new Tray(`${app.getAppPath()}/assets/tray.png`)
}
this.tray.on('click', () => this.focus())
this.tray.on('click', () => setTimeout(() => this.focus()));
const contextMenu = Menu.buildFromTemplate([{
label: 'Show',
@ -100,7 +100,6 @@ export class Application {
focus () {
for (let window of this.windows) {
window.show()
window.focus()
}
}