Skip to content

The VS Code of video editing, built for agents.

TypeScript

Enhance main window management and improve scene initialization logic

konstantin-paulus05f2245e24bc
diff --git a/apps/desktop/src/main.ts b/apps/desktop/src/main.ts
index 06dca411..f6ee5ba2 100644
--- a/apps/desktop/src/main.ts
+++ b/apps/desktop/src/main.ts
@@ -285,9 +285,16 @@ if (app.requestSingleInstanceLock()) {
});
app.on("activate", () => {
- if (BrowserWindow.getAllWindows().length === 0) {
+ if (!mainWindow || mainWindow.isDestroyed()) {
createWindow();
+ return;
}
+
+ if (mainWindow.isMinimized()) {
+ mainWindow.restore();
+ }
+ mainWindow.show();
+ mainWindow.focus();
});
} else {
app.quit();
diff --git a/apps/web/src/components/canvas/scene-init-overlay.tsx b/apps/web/src/components/canvas/scene-init-overlay.tsx
index 16dd1ab3..5b96f9f4 100644
--- a/apps/web/src/components/canvas/scene-init-overlay.tsx
+++ b/apps/web/src/components/canvas/scene-init-overlay.tsx
@@ -46,7 +46,8 @@ export function SceneInitOverlay(props: DropOverlayProps) {
let buttonRef: HTMLButtonElement | undefined;
const showOverlay = createMemo(() => {
- return initialized() && world.timelineIndex().root === null && getAllEntities(world).length === 0;
+ world.timelineIndex(); // ensures reactivity
+ return initialized() && getAllEntities(world).length === 0;
});
const aspectRatio = () => {