aboutsummaryrefslogtreecommitdiffhomepage
path: root/player/lua
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2014-12-05 15:55:19 +0100
committerGravatar wm4 <wm4@nowhere>2014-12-05 16:04:04 +0100
commitf95a4bceaa58a51b0a3ff5e16f50bf48b1c814d0 (patch)
tree03f3c439c3f851957cabfb5ea70e04bd086abf49 /player/lua
parent254c60e608738be4c6a9ed6db6acfae41b830980 (diff)
osc, dvd, bd: fix mouse state when changing menu modes
The flags weren't correctly set, and the mouse cursor remained visible after leaving menu mode. This was apparently broken in 0.7.0 too. Fixes #1316.
Diffstat (limited to 'player/lua')
-rw-r--r--player/lua/osc.lua10
1 files changed, 7 insertions, 3 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua
index c4f6350a0c..c513843fb6 100644
--- a/player/lua/osc.lua
+++ b/player/lua/osc.lua
@@ -1853,9 +1853,13 @@ function tick()
end
end
+function do_enable_keybindings()
+ mp.enable_key_bindings("showhide", "allow-vo-dragging|allow-hide-cursor")
+end
+
function enable_osc(enable)
if enable then
- mp.enable_key_bindings("showhide")
+ do_enable_keybindings()
show_osc()
else
hide_osc()
@@ -1881,7 +1885,7 @@ mp.observe_property("disc-menu-active", "bool", function(name, val)
hide_osc()
mp.disable_key_bindings("showhide")
else
- mp.enable_key_bindings("showhide")
+ do_enable_keybindings()
end
end)
@@ -1890,7 +1894,7 @@ mp.set_key_bindings({
{"mouse_move", function(e) process_event("mouse_move", nil) end},
{"mouse_leave", mouse_leave},
}, "showhide", "force")
-mp.enable_key_bindings("showhide", "allow-vo-dragging|allow-hide-cursor")
+do_enable_keybindings()
--mouse input bindings
mp.set_key_bindings({