diff options
author | wm4 <wm4@nowhere> | 2015-01-15 20:09:32 +0100 |
---|---|---|
committer | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2015-01-25 17:00:19 +0900 |
commit | 595c4cf8724236563a57aa17cad3f28c55e453ec (patch) | |
tree | 2a506dda2d6e8c3aa7c44e1d2bbd68df025e91a0 | |
parent | 4ebed102f0f638fbd87197e98bb5b42ebb2f4712 (diff) | |
download | mpv-595c4cf8724236563a57aa17cad3f28c55e453ec.tar.bz2 mpv-595c4cf8724236563a57aa17cad3f28c55e453ec.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.
-rw-r--r-- | player/lua/osc.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua index 49a9d460ce..29d65126d8 100644 --- a/player/lua/osc.lua +++ b/player/lua/osc.lua @@ -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() |