mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 12:02:23 +02: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
c88b535c46
commit
a6997be61b
@ -76,6 +76,7 @@ local state = {
|
||||
timer = nil,
|
||||
cache_idle = false,
|
||||
idle = false,
|
||||
enabled = true,
|
||||
}
|
||||
|
||||
|
||||
@ -1907,10 +1908,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