From 63d83217ef371bfc73351412a5b5e04b24502604 Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Wed, 22 Jul 2026 16:56:42 +0200 Subject: [PATCH] fix(linux/capture): a stale id-0 cursor meta is 'no information', not 'hidden' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mutter only rewrites a buffer's SPA_META_Cursor region when the cursor changed; recycled buffers between damage frames carry a stale id-0 meta. Treating id 0 as a hidden pointer flickered the client cursor off between hovers on-glass — per the SPA contract id 0 is 'invalid/no cursor info', so keep the last-known state (OBS's consumer does the same). A genuinely hidden pointer stops producing updates; the M3 relative-mode hint keeps its Windows CURSOR_SUPPRESSED source. Co-Authored-By: Claude Fable 5 --- crates/pf-capture/src/linux/mod.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/pf-capture/src/linux/mod.rs b/crates/pf-capture/src/linux/mod.rs index ba3f4fa0..187fe903 100644 --- a/crates/pf-capture/src/linux/mod.rs +++ b/crates/pf-capture/src/linux/mod.rs @@ -1417,8 +1417,12 @@ mod pipewire { ); } if id == 0 { - // Compositor reports no visible pointer (e.g. a game grabbed/hid it). - cursor.visible = false; + // SPA contract: id 0 = "no cursor information", NOT "cursor hidden". Mutter only + // REWRITES a buffer's meta region when the cursor changed, so recycled buffers + // between damage frames carry a stale id-0 meta — treating that as hidden flickered + // the cursor off between hovers (on-glass round 5). Keep the last-known state; a + // pointer that really left/hid simply stops producing updates. (The M3 hidden hint + // loses its Mutter signal — Windows has its own CURSOR_SUPPRESSED source.) return; } cursor.visible = true;