mirror of
https://github.com/rubickCenter/rubick
synced 2025-06-16 08:26:56 +08:00
Merge pull request #71 from woojufon/patch-5
自定义 CommandOrControl+W,关闭窗口会导致错误
This commit is contained in:
commit
8fb01cd158
@ -58,6 +58,15 @@ class initApp {
|
|||||||
} else {
|
} else {
|
||||||
readyFunction()
|
readyFunction()
|
||||||
}
|
}
|
||||||
|
// 自定义 CommandOrControl+W,关闭窗口会导致错误
|
||||||
|
app.on("browser-window-focus", function () {
|
||||||
|
globalShortcut.register("CommandOrControl+W", () => {
|
||||||
|
const win = main.getWindow();
|
||||||
|
if(win.isVisible()){
|
||||||
|
win.hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onRunning() {
|
onRunning() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user