diff --git a/packages/gui/src/background.js b/packages/gui/src/background.js index 76a7509..6277aba 100644 --- a/packages/gui/src/background.js +++ b/packages/gui/src/background.js @@ -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() + } + } + }) } }) }