Skip to content

fix(vlc): converge VLC video placement below the ticker strip (v0.87.2) - #200

Merged
beveradb merged 1 commit into
mainfrom
fix-vlc-ticker-placement-loop
Jul 17, 2026
Merged

fix(vlc): converge VLC video placement below the ticker strip (v0.87.2)#200
beveradb merged 1 commit into
mainfrom
fix-vlc-ticker-placement-loop

Conversation

@beveradb

Copy link
Copy Markdown
Contributor

@coderabbitai ignore

Follow-up to #199. That shipped per-play VLC window placement, but a single-shot wmctrl correction mis-landed on the live karaoke window at y=160 instead of 80 — VLC nudges/resizes its own window while a 4K file loads, so the lone 0.4s-later measurement read a stale position.

Fix: _position_window now drives a short closed loop — request → settle → measure → adjust the next request by the observed error (req += target − actual) — converging to (0, margin) within a 2px tolerance, and soft-warns (never falsely logs success) if it can't settle.

Validated end-to-end on NomadPC (this exact algorithm, live): displaced window (304,372) → iter1 (0,80)→(4,152) → iter2 (-4,8)→(0,80), settles at 1920×1000+0+80, matching mpv. 50 unit tests pass; CodeRabbit clean.

v0.87.1's single-shot wmctrl correction mis-landed on the live karaoke
window (y=160 instead of 80): VLC nudges/resizes its own window while a 4K
file loads, so the one 0.4s-later measurement read a stale position and
the lone correction was wrong. Replace it with a short closed loop —
request, settle, measure, adjust the next request by the observed error —
that converges to (0, margin) within a 2px tolerance, and soft-warns
(never falsely claims success) if it can't settle. Validated end-to-end on
NomadPC: VLC video settles at 1920x1000+0+80, matching mpv.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@beveradb
beveradb merged commit f649751 into main Jul 17, 2026
2 checks passed
@beveradb
beveradb deleted the fix-vlc-ticker-placement-loop branch July 17, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant