mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 15:40:12 +01:00
This commit is contained in:
parent
24f43654bd
commit
5c55eecc0b
1 changed files with 7 additions and 1 deletions
|
|
@ -706,7 +706,13 @@ app.whenReady().then(() => {
|
||||||
return hasMatch;
|
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);
|
const currentWindow = getWindowByContentId(event.sender.id);
|
||||||
currentWindow.on("focus", () => {
|
currentWindow.on("focus", () => {
|
||||||
event.sender.send("siyuan-event", "focus");
|
event.sender.send("siyuan-event", "focus");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue