Merge branch 'agents/tray-icon-main-window-fix'

This commit is contained in:
David Kaya
2026-04-16 14:16:33 +02:00
2 changed files with 7 additions and 9 deletions
+4 -4
View File
@@ -69,9 +69,9 @@ async function bootstrap(): Promise<void> {
applyTitleBarTheme(mainWindow, workspace.settings.theme);
systemTray = new SystemTray({
onShowWindow: showAndFocusWindow,
onShowWindow: () => showAndFocusWindow(mainWindow!),
onCreateScratchpad: () => {
showAndFocusWindow();
showAndFocusWindow(mainWindow!);
mainWindow?.webContents.send('tray:create-scratchpad');
},
onQuit: () => app.quit(),
@@ -137,8 +137,8 @@ app.on('window-all-closed', () => {
app.on('activate', async () => {
if (BrowserWindow.getAllWindows().length === 0) {
await bootstrap();
} else {
showAndFocusWindow();
} else if (mainWindow && !mainWindow.isDestroyed()) {
showAndFocusWindow(mainWindow);
}
});