mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-09-24 14:55:37 +00:00
fix(recording): recover from fullscreen countdown failures
This commit is contained in:
+15
-1
@@ -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)
|
||||
|
||||
+6
-1
@@ -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();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -1300,6 +1300,7 @@ export function useScreenRecorder(): UseScreenRecorderReturn {
|
||||
: "Failed to start recording",
|
||||
);
|
||||
setRecording(false);
|
||||
await window.electronAPI?.setRecordingState(false);
|
||||
cleanupCapturedMedia();
|
||||
await stopWebcamRecorder();
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user