Skip to content

osc: reevaluate mouse state after leaving never - #17969

Merged
kasper93 merged 1 commit into
mpv-player:masterfrom
N-R-K:nrk/osc-mouse-reeval
Jun 3, 2026
Merged

osc: reevaluate mouse state after leaving never#17969
kasper93 merged 1 commit into
mpv-player:masterfrom
N-R-K:nrk/osc-mouse-reeval

Conversation

@N-R-K

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

Copy link
Copy Markdown
Contributor

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: #17954 (comment)

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
N-R-K force-pushed the nrk/osc-mouse-reeval branch from 858e554 to a8c9493 Compare May 23, 2026 08:15
@kasper93
kasper93 merged commit 6d5c859 into mpv-player:master Jun 3, 2026
31 of 33 checks passed
Comment thread player/lua/osc.lua
-- mode can be auto/always/never/cycle
-- the modes only affect internal variables and not stored on its own.
local function visibility_mode(mode, no_osd)
local old_vis = mp.get_property_native("user-data/osc/visibility") or user_opts.visibility

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.

This is very strange to check user-data here.

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 script-opts is updated at runtime then user_opts.visibility contains the new/desired visibility. We want to know the the old visibility that we're transitioning out of.

@N-R-K
N-R-K deleted the nrk/osc-mouse-reeval branch June 4, 2026 10:01
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.

2 participants