fix(vlc): converge VLC video placement below the ticker strip (v0.87.2) - #200
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@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=160instead of80— VLC nudges/resizes its own window while a 4K file loads, so the lone 0.4s-later measurement read a stale position.Fix:
_position_windownow 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 at1920×1000+0+80, matching mpv. 50 unit tests pass; CodeRabbit clean.