summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-15 20:09:32 +0100
committerwm4 <wm4@nowhere>2015-01-15 20:09:32 +0100
commita6997be61b6449117edf4e5aee0b10206a3bce67 (patch)
tree80d95b1132798aa4e0436dfb25f6de7e1c24ab0f /player
parentc88b535c4661df605b87cd4fc6eea95f7eeb45dc (diff)
downloadmpv-a6997be61b6449117edf4e5aee0b10206a3bce67.tar.bz2
mpv-a6997be61b6449117edf4e5aee0b10206a3bce67.tar.xz
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.
Diffstat (limited to 'player')
-rw-r--r--player/lua/osc.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua
index 3462f1534c..682e213159 100644
--- a/player/lua/osc.lua
+++ b/player/lua/osc.lua
@@ -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()