🎨 Fix focus issues on Windows after dialog interactions (#16073)

fix https://github.com/siyuan-note/siyuan/issues/16071
This commit is contained in:
Jeffrey Chen 2025-10-18 10:43:29 +08:00 committed by GitHub
parent 8725e5daa8
commit 067db0791f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 47 additions and 0 deletions

View file

@ -866,6 +866,13 @@ app.whenReady().then(() => {
event.sender.send("siyuan-event", "leave-full-screen");
});
});
ipcMain.on("siyuan-focus-fix", (event) => {
const currentWindow = getWindowByContentId(event.sender.id);
if (currentWindow && process.platform === "win32") {
currentWindow.blur();
currentWindow.focus();
}
});
ipcMain.on("siyuan-cmd", (event, data) => {
let cmd = data;
let webContentsId = event.sender.id;