This commit is contained in:
Daniel 2024-12-25 21:59:10 +08:00
parent 746226054a
commit e24a462003
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
5 changed files with 36 additions and 15 deletions

View file

@ -1007,6 +1007,17 @@ app.whenReady().then(() => {
ipcMain.on("siyuan-quit", (event, port) => {
exitApp(port);
});
ipcMain.on("siyuan-show-window", (event) => {
const mainWindow = getWindowByContentId(event.sender.id);
if (!mainWindow) {
return;
}
if (mainWindow.isMinimized()) {
mainWindow.restore();
}
mainWindow.show();
});
ipcMain.on("siyuan-open-window", (event, data) => {
const mainWindow = BrowserWindow.getFocusedWindow() || BrowserWindow.getAllWindows()[0];
const mainBounds = mainWindow.getBounds();