linux,快捷键不关闭窗口

pull/360/head
王良 2024-09-20 12:02:43 +08:00
parent 9d7d70e38e
commit 7f661ae45c
1 changed files with 10 additions and 1 deletions

View File

@ -284,7 +284,16 @@ function initApp () {
app.whenReady().then(() => {
globalShortcut.unregisterAll()
if (DevSidecar.api.config.get().app.showHideShortcut) {
globalShortcut.register(DevSidecar.api.config.get().app.showHideShortcut, switchWin)
globalShortcut.register(DevSidecar.api.config.get().app.showHideShortcut, () => {
if (winIsHidden) {
showWin()
} else {
// linux快捷键不关闭窗口
if (!isLinux()) {
hideWin()
}
}
})
}
})
}