mirror of
https://github.com/mpv-player/mpv
synced 2025-02-17 21:27:08 +00:00
osc: fix disabling OSC
Upon the "DEL" key binding or the "disable-osc" message, the OSC should stay permanently invisible. This was recently broken (not sure by what), because other code accidentally reenables it anyway, which resulted in the OSC appearing again when moving the mouse.
This commit is contained in:
parent
4ebed102f0
commit
595c4cf872
@ -72,6 +72,7 @@ local state = {
|
||||
timer = nil,
|
||||
cache_idle = false,
|
||||
idle = false,
|
||||
enabled = true,
|
||||
}
|
||||
|
||||
|
||||
@ -1894,10 +1895,13 @@ function tick()
|
||||
end
|
||||
|
||||
function do_enable_keybindings()
|
||||
mp.enable_key_bindings("showhide", "allow-vo-dragging|allow-hide-cursor")
|
||||
if state.enabled then
|
||||
mp.enable_key_bindings("showhide", "allow-vo-dragging|allow-hide-cursor")
|
||||
end
|
||||
end
|
||||
|
||||
function enable_osc(enable)
|
||||
state.enabled = enable
|
||||
if enable then
|
||||
do_enable_keybindings()
|
||||
show_osc()
|
||||
|
Loading…
Reference in New Issue
Block a user