Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

refactor(cursor): drop the always-true click effects gate

EtienneLescot4c0fcc83529e
diff --git a/src/components/ai-edition/RightPanes.tsx b/src/components/ai-edition/RightPanes.tsx
index a52b55d22..625c94d1d 100644
--- a/src/components/ai-edition/RightPanes.tsx
+++ b/src/components/ai-edition/RightPanes.tsx
@@ -95,7 +95,6 @@ import type {
} from "@/lib/ai-edition/transcription/status";
import { getAssetPath } from "@/lib/assetPath";
import { resolveWebcamLayoutPreset, supportsWebcamReactiveZoom } from "@/lib/compositeLayout";
-import { supportsCursorClickEffects } from "@/lib/cursor/cursorCapabilities";
import {
CURSOR_THEMES,
DEFAULT_CURSOR_THEME_ID,
@@ -3867,29 +3866,22 @@ export function CursorPane() {
}}
onCommit={() => void commit()}
/>
- {/* Wayland gives an unprivileged process no way to observe mouse
- buttons, so on Linux this slider provably cannot change a pixel
- at any value — see `supportsCursorClickEffects`. Dropped rather
- than shown as a control that does nothing, exactly as
- "Shrink on zoom" is above. */}
- {supportsCursorClickEffects() ? (
- <SliderCell
- label={ts("cursor.clickBounce")}
- value={settings.cursor.clickBounce * 10}
- min={0}
- max={50}
- step={0.1}
- decimals={1}
- disabled={!hasDocument}
- onChange={(v) => {
- setLive({ cursor: { clickBounce: v / 10 } });
- if (isNativeCompositorActive()) {
- setNativeParam("cursorClickBounce", v / 10);
- }
- }}
- onCommit={() => void commit()}
- />
- ) : null}
+ <SliderCell
+ label={ts("cursor.clickBounce")}
+ value={settings.cursor.clickBounce * 10}
+ min={0}
+ max={50}
+ step={0.1}
+ decimals={1}
+ disabled={!hasDocument}
+ onChange={(v) => {
+ setLive({ cursor: { clickBounce: v / 10 } });
+ if (isNativeCompositorActive()) {
+ setNativeParam("cursorClickBounce", v / 10);
+ }
+ }}
+ onCommit={() => void commit()}
+ />
</div>
</Pane>
);
diff --git a/src/lib/cursor/cursorCapabilities.ts b/src/lib/cursor/cursorCapabilities.ts
deleted file mode 100644
index 5b6440789..000000000
--- a/src/lib/cursor/cursorCapabilities.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Can this platform tell us when a mouse button was pressed?
- *
- * True on every platform we support. macOS and Windows read real button state in
- * their native cursor helpers (`macNativeCursorRecordingSession.ts`,
- * `windowsNativeRecordingSession.ts`).
- *
- * On Linux/Wayland the ScreenCast portal still reports pointer POSITION as frame
- * metadata and nothing else — there is no portal for button events. But the
- * capture helper now reads left-button presses directly from `/dev/input/event*`
- * via evdev and tags the coinciding sample `interactionType: "click"` (the
- * pipewire helper's `input.rs`; the accumulator preserves the tag in
- * `pipeWireCursorAccumulator.ts`). Those clicks travel in the `.cursor.json`
- * sidecar, populate the compositor's `CursorTrack.clicks` vector (`cursor.rs`),
- * and drive `CursorTrack::bounce()` through the shared geometry in
- * `frame_geometry.rs` — the exact same path macOS and Windows take, with no
- * Linux-specific branch.
- *
- * Reading `/dev/input` requires the recording user to be in the `input` group.
- * When they are not, no click is captured and every sample stays a plain move,
- * so the effect has nothing to act on — a recording-side permission matter, not
- * a reason to hide the control (see `website/docs/installation.md`).
- */
-export function supportsCursorClickEffects(): boolean {
- return true;
-}