summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2019-12-01 17:23:02 -0600
committerDudemanguy <random342@airmail.cc>2019-12-01 17:23:02 -0600
commit7da15ca9bdf2393760880f148c4a7101ef11941a (patch)
tree3bd423415696d9f5a897117e067f28b51e5f32d5
parent61b8e1d436976b0d13805728c4b7f3ccd8061c90 (diff)
downloadmpv-7da15ca9bdf2393760880f148c4a7101ef11941a.tar.bz2
mpv-7da15ca9bdf2393760880f148c4a7101ef11941a.tar.xz
osc: don't always set window control keybindings
Only set the window control keybindings if the window control option is actually enabled. Fixes #7212.
-rw-r--r--player/lua/osc.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua
index a7cc62a91e..2c4a9d9558 100644
--- a/player/lua/osc.lua
+++ b/player/lua/osc.lua
@@ -2488,10 +2488,12 @@ mp.set_key_bindings({
{"mouse_move", function(e) process_event("mouse_move", nil) end},
{"mouse_leave", mouse_leave},
}, "showhide", "force")
-mp.set_key_bindings({
- {"mouse_move", function(e) process_event("mouse_move", nil) end},
- {"mouse_leave", mouse_leave},
-}, "showhide_wc", "force")
+if user_opts.windowcontrols ~= "no" then
+ mp.set_key_bindings({
+ {"mouse_move", function(e) process_event("mouse_move", nil) end},
+ {"mouse_leave", mouse_leave},
+ }, "showhide_wc", "force")
+end
do_enable_keybindings()
--mouse input bindings