Merge branch 'master' of github.com:Eugeny/terminus

This commit is contained in:
Eugene Pankov
2020-04-21 09:38:50 +02:00
4 changed files with 36 additions and 3 deletions

View File

@@ -103,6 +103,12 @@ export class Window {
}
})
this.window.on('blur', () => {
if (this.configStore.appearance?.dockHideOnBlur) {
this.hide()
}
})
this.window.loadURL(`file://${app.getAppPath()}/dist/index.html?${this.window.id}`, { extraHeaders: 'pragma: no-cache\n' })
if (process.platform !== 'darwin') {
@@ -193,8 +199,13 @@ export class Window {
this.window.focus()
})
} else {
// docked, visible
this.window.hide()
if (this.configStore.appearance?.dockAlwaysOnTop) {
// docked, visible, on top
this.window.hide()
} else {
// docked, visible, not on top
this.window.focus()
}
}
}
}