mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 16:40:13 +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 {
|
} else {
|
||||||
if (mainWindow.isVisible()) {
|
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 {
|
} else {
|
||||||
mainWindow.show()
|
mainWindow.show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('win32' === process.platform || 'linux' === process.platform) {
|
if ('win32' === process.platform || 'linux' === process.platform) {
|
||||||
resetTrayMenu(item.tray, data.languages, mainWindow)
|
resetTrayMenu(item.tray, data.languages, mainWindow)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue