Skip to content

osc: only clear thumbnails when hiding#17954

Open
N-R-K wants to merge 2 commits into
mpv-player:masterfrom
N-R-K:nrk/flicker-fix
Open

osc: only clear thumbnails when hiding#17954
N-R-K wants to merge 2 commits into
mpv-player:masterfrom
N-R-K:nrk/flicker-fix

Conversation

@N-R-K
Copy link
Copy Markdown
Contributor

@N-R-K N-R-K commented May 21, 2026

this currently disables thumbnail even on set_visible(true) calls which was causing flickering due when scrubbing through the timeline. only disable thumbnail when hiding the osc.

Fixes: 9ce79bc

this currently disables thumbnail even on set_visible(true)
calls which was causing flickering due when scrubbing through
the timeline. only disable thumbnail when hiding the osc.

Fixes: 9ce79bc
@N-R-K
Copy link
Copy Markdown
Contributor Author

N-R-K commented May 21, 2026

ping: @guidocella

Comment thread player/lua/osc.lua
local function osc_visible(visible)
set_bar_visible("osc_visible", visible)
disable_thumbnail()
if not visible then
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if thumbnail should be shown when visible=true, why ignore?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if thumbnail should be shown when visible=true, why ignore?

This should be handled by the ui drawing code already.

But more importantly, I noticed that going into visibility never doesn't even clear the thumbnail, even on master.

Copy link
Copy Markdown
Contributor Author

@N-R-K N-R-K May 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be handled by the ui drawing code already.

Yeah this doesn't work either. You need to actively move your mouse to retrigger the thumbnail.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But more importantly, I noticed that going into visibility never doesn't even clear the thumbnail, even on master.

Should be fixed now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be handled by the ui drawing code already.

Yeah this doesn't work either. You need to actively move your mouse to retrigger the thumbnail.

If you go from visibility never -> auto, then the osc itself doesn't redraw either without moving the mouse manually. This seems like a deeper issue with how osc drawing works.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you go from visibility never -> auto, then the osc itself doesn't redraw either without moving the mouse manually.

#17969

currently hide_bar() bypasses set_visible when visibility was
changed to `never`, this can leave the thumbnail hanging.

instead of scattering disable_thumbnail() calls around, just
call set_visible(false) instead.

Fixes: 9ce79bc
N-R-K added a commit to N-R-K/mpv that referenced this pull request May 23, 2026
currently mouse processing only happens on mouse movement which
causes cases where going from never -> auto does not show the
osc even though the cursor might be in proximity.

move mouse processing code to a function and refresh it when
leaving visibility never to avoid such issues.

Fixes: mpv-player#17954 (comment)
N-R-K added a commit to N-R-K/mpv that referenced this pull request May 23, 2026
currently mouse processing only happens on mouse movement which
causes cases where going from never -> auto does not show the
osc even though the cursor might be in proximity.

move mouse processing code to a function and refresh it when
leaving visibility never to avoid such issues.

Fixes: mpv-player#17954 (comment)
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.

3 participants