optimize: 优化快捷键显示/隐藏窗口功能:当窗口打开着但未获取焦点时,快捷键可获取窗口焦点,而不是隐藏窗口。
parent
56afeebf05
commit
e94056941a
|
@ -285,8 +285,13 @@ function initApp () {
|
|||
globalShortcut.unregisterAll()
|
||||
if (DevSidecar.api.config.get().app.showHideShortcut) {
|
||||
globalShortcut.register(DevSidecar.api.config.get().app.showHideShortcut, () => {
|
||||
if (winIsHidden) {
|
||||
showWin()
|
||||
if (winIsHidden || !win.isFocused()) {
|
||||
if (!win.isFocused()) {
|
||||
win.focus()
|
||||
}
|
||||
if (winIsHidden) {
|
||||
showWin()
|
||||
}
|
||||
} else {
|
||||
// linux,快捷键不关闭窗口
|
||||
if (!isLinux()) {
|
||||
|
|
Loading…
Reference in New Issue