mirror of
https://github.com/heyman/heynote.git
synced 2025-06-24 19:41:30 +02:00
Restore window if minimized when global hotkey is pressed
This commit is contained in:
parent
192bd2a62f
commit
9e50446417
@ -154,6 +154,9 @@ function registerGlobalHotkey() {
|
|||||||
try {
|
try {
|
||||||
const ret = globalShortcut.register(CONFIG.get("settings.globalHotkey"), () => {
|
const ret = globalShortcut.register(CONFIG.get("settings.globalHotkey"), () => {
|
||||||
app.focus({steal: true})
|
app.focus({steal: true})
|
||||||
|
if (win?.isMinimized()) {
|
||||||
|
win?.restore()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("Could not register global hotkey:", error)
|
console.log("Could not register global hotkey:", error)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user