summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-12-04 18:32:14 +0100
committerAlessandro Ghedini <alessandro@ghedini.me>2014-12-07 23:54:12 +0100
commit4ced125239ee084f30de774de7ef61bc20f69c98 (patch)
tree5d18615afb630387eab349f40a6caf79ca5e0c9d
parentac94c8113409ec65bd4165599149e404093a2d15 (diff)
downloadmpv-4ced125239ee084f30de774de7ef61bc20f69c98.tar.bz2
mpv-4ced125239ee084f30de774de7ef61bc20f69c98.tar.xz
dvd, bd, osc: disable OSC while a menu is active
They interfere. It turns out that commit b6ca4a48 actually broke this in weird ways, but this solution is better anyway.
-rw-r--r--player/lua/osc.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua
index f2485700b3..c4f6350a0c 100644
--- a/player/lua/osc.lua
+++ b/player/lua/osc.lua
@@ -1876,6 +1876,15 @@ mp.observe_property("fullscreen", "bool", function(name, val) state.fullscreen =
mp.observe_property("pause", "bool", pause_state)
mp.observe_property("cache-idle", "bool", cache_state)
+mp.observe_property("disc-menu-active", "bool", function(name, val)
+ if val == true then
+ hide_osc()
+ mp.disable_key_bindings("showhide")
+ else
+ mp.enable_key_bindings("showhide")
+ end
+end)
+
-- mouse show/hide bindings
mp.set_key_bindings({
{"mouse_move", function(e) process_event("mouse_move", nil) end},