mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
This commit is contained in:
@@ -706,7 +706,13 @@ app.whenReady().then(() => {
|
||||
return hasMatch;
|
||||
}
|
||||
});
|
||||
ipcMain.once("siyuan-event", (event) => {
|
||||
|
||||
const initEventId = [];
|
||||
ipcMain.on("siyuan-event", (event) => {
|
||||
if (initEventId.includes(event.sender.id)) {
|
||||
return;
|
||||
}
|
||||
initEventId.push(event.sender.id);
|
||||
const currentWindow = getWindowByContentId(event.sender.id);
|
||||
currentWindow.on("focus", () => {
|
||||
event.sender.send("siyuan-event", "focus");
|
||||
|
||||
Reference in New Issue
Block a user