mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
🎨 改进 Alt+M 激活窗口 https://github.com/siyuan-note/siyuan/issues/7258
This commit is contained in:
parent
5158ade004
commit
fe4f10aa1d
1 changed files with 10 additions and 1 deletions
|
|
@ -810,11 +810,20 @@ app.whenReady().then(() => {
|
|||
}
|
||||
} else {
|
||||
if (mainWindow.isVisible()) {
|
||||
mainWindow.hide()
|
||||
if (1 === workspaces.length) { // 改进 `Alt+M` 激活窗口 https://github.com/siyuan-note/siyuan/issues/7258
|
||||
if (!mainWindow.isFocused()) {
|
||||
mainWindow.show()
|
||||
} else {
|
||||
mainWindow.hide()
|
||||
}
|
||||
} else {
|
||||
mainWindow.hide()
|
||||
}
|
||||
} else {
|
||||
mainWindow.show()
|
||||
}
|
||||
}
|
||||
|
||||
if ('win32' === process.platform || 'linux' === process.platform) {
|
||||
resetTrayMenu(item.tray, data.languages, mainWindow)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue