Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.
TypeScript cross-platformelectronffmpegopen-sourceproduct-demorustscreen-capturescreen-recorderscreen-recordingscreen-studioscreencastspeech-to-texttypescriptvideo-editingvideo-editorwaylandwgpuwhisper
fix(hud): no editable-cursor promise when capture falls back to the browser
EtienneLescotd8b6b1e3d53e
diff --git a/src/components/launch/LaunchWindow.test.tsx b/src/components/launch/LaunchWindow.test.tsxindex e62e6bd6d..112abaedd 100644--- a/src/components/launch/LaunchWindow.test.tsx+++ b/src/components/launch/LaunchWindow.test.tsx@@ -430,6 +430,22 @@ describe("LaunchWindow record button", () => {);});+ it("never promises the editable cursor's effects when capture falls back to the browser", async () => {+ // Linux without its PipeWire helper records through the browser, which always bakes the+ // system cursor in: switching to the editable cursor would restore nothing.+ platformState.value = "linux";+ linuxHelperAvailable.value = false;+ recorderState.value.cursorCaptureMode = "system";+ renderLaunchWindow();++ await waitFor(() =>+ expect(screen.getByTestId("launch-cursor-mode-button")).toHaveAttribute(+ "title",+ "Use system cursor: turns off auto zoom and cursor effects",+ ),+ );+ });+it("names the recording-state HUD controls for assistive technology", async () => {recorderState.value.recording = true;recorderState.value.canPauseRecording = true;diff --git a/src/components/launch/LaunchWindow.tsx b/src/components/launch/LaunchWindow.tsxindex 9ec81f49f..5084a01ae 100644--- a/src/components/launch/LaunchWindow.tsx+++ b/src/components/launch/LaunchWindow.tsx@@ -132,6 +132,7 @@ export function LaunchWindow() {);const [supportsCursorModeToggle, setSupportsCursorModeToggle] = useState(false);const [isLinuxHud, setIsLinuxHud] = useState(false);+ const [browserForcesSystemCursor, setBrowserForcesSystemCursor] = useState(false);// The running version, and whether this copy may offer an update check at all — a// Store/Flathub/Snap/Nix install is kept current by its package manager and is offered// nothing (electron/install-channel.ts). Asked once: neither answer changes while the app@@ -238,6 +239,22 @@ export function LaunchWindow() {platform === "win32" || platform === "darwin" || platform === "linux",);setIsLinuxHud(platform === "linux");+ // Without its native helper, macOS or Linux records through the browser, which+ // always bakes in the system cursor (`effectiveBrowserCursorMode`). Switching+ // to the editable cursor then restores nothing, so the hint must not say so.+ const probe =+ platform === "darwin"+ ? window.electronAPI?.isNativeMacCaptureAvailable+ : platform === "linux"+ ? window.electronAPI?.isNativeLinuxCaptureAvailable+ : undefined;+ probe?.()+ .then((result) => {+ if (!cancelled) setBrowserForcesSystemCursor(!result.success || !result.available);+ })+ .catch(() => {+ if (!cancelled) setBrowserForcesSystemCursor(true);+ });}}).catch(() => {@@ -1162,7 +1179,7 @@ export function LaunchWindow() {editableOverlay={cursorCaptureMode === "editable-overlay"}disabled={controlsLocked}label={- cursorCaptureMode === "editable-overlay"+ cursorCaptureMode === "editable-overlay" || browserForcesSystemCursor? t("cursor.useSystemCursorHint"): t("cursor.useEditableCursorHint")}