This commit is contained in:
Eugene Pankov
2020-04-20 11:25:20 +02:00
parent f8645df60c
commit d36ef2e48e
5 changed files with 9 additions and 9 deletions

View File

@@ -12,7 +12,7 @@ export class Application {
ipcMain.on('app:config-change', (_event, config) => {
this.broadcast('host:config-change', config)
})
ipcMain.on('app:register-global-hotkey', (_event, specs) => {
globalShortcut.unregisterAll()
for (let spec of specs) {
@@ -64,7 +64,7 @@ export class Application {
return window
}
onGlobalHotkey () {
onGlobalHotkey (): void {
if (this.windows.some(x => x.isFocused())) {
for (let window of this.windows) {
window.hide()
@@ -76,7 +76,7 @@ export class Application {
}
}
presentAllWindows() {
presentAllWindows (): void {
for (let window of this.windows) {
window.present()
}

View File

@@ -169,7 +169,7 @@ export class Window {
return this.window.isFocused()
}
hide () {
hide (): void {
if (process.platform === 'darwin') {
// Lose focus
Menu.sendActionToFirstResponder('hide:')
@@ -180,7 +180,7 @@ export class Window {
}
}
present () {
present (): void {
if (!this.window.isVisible()) {
// unfocused, invisible
this.window.show()