1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-11-29 09:18:26 +03:00

fixed window re-focusing on linux

This commit is contained in:
Eugene Pankov 2021-01-24 19:27:36 +01:00
parent 0cf883cc4a
commit 78bd90ac55
2 changed files with 5 additions and 1 deletions

View File

@ -75,7 +75,7 @@ export class Application {
}
onGlobalHotkey (): void {
if (this.windows.some(x => x.isFocused())) {
if (this.windows.some(x => x.isFocused() && x.isVisible())) {
for (const window of this.windows) {
window.hide()
}

View File

@ -190,6 +190,10 @@ export class Window {
return this.window.isFocused()
}
isVisible (): boolean {
return this.window.isVisible()
}
hide (): void {
if (process.platform === 'darwin') {
// Lose focus