Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,21 @@ function restoreWindowSafely(window: BrowserWindow | null) {
return;
}

window.restore();
if (!isEditorWindow(window) && process.platform === "win32") {
showHudOverlayFromTray();
return;
}

if (window.isMinimized()) {
window.restore();
}

if (!window.isVisible()) {
window.show();
}

window.moveTop();
window.focus();
}

// Tray Icons (lazily created after app is ready to avoid accessing Electron APIs too early)
Expand Down
7 changes: 6 additions & 1 deletion electron/windows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,12 @@ export function createCountdownWindow(): BrowserWindow {

win.webContents.on("did-finish-load", () => {
if (!win.isDestroyed()) {
win.show();
if (process.platform === "win32") {
win.showInactive();
win.moveTop();
} else {
win.show();
}
}
});

Expand Down
10 changes: 8 additions & 2 deletions src/hooks/useScreenRecorder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1300,8 +1300,14 @@ export function useScreenRecorder(): UseScreenRecorderReturn {
: "Failed to start recording",
);
setRecording(false);
cleanupCapturedMedia();
await stopWebcamRecorder();
try {
await window.electronAPI?.setRecordingState(false);
} catch (stateError) {
console.warn("Failed to reset main-process recording state:", stateError);
} finally {
cleanupCapturedMedia();
await stopWebcamRecorder();
}
} finally {
startInFlight.current = false;
setStarting(false);
Expand Down