From bc33649c68238f5a4c602a8cc234ba24db678ad3 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Tue, 20 Jan 2026 11:30:39 -0800 Subject: disable VO dragging while menu is open --- main.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'main.lua') diff --git a/main.lua b/main.lua index 1f93058..f454034 100644 --- a/main.lua +++ b/main.lua @@ -1263,11 +1263,15 @@ end -- while the OSD is visible. these commands are technically deprecated for -- non-internal use, but they still work, and there doesn't appear to be -- another way apart from setting an override for each individual key. +-- +-- nonexistent `nodrag' section is enabled to disable VO dragging while the +-- menu is open. local function set_key_bindings() if osd:is_hidden() then if binding_state.bound then mp.remove_key_binding('mouse_move') mp.remove_key_binding('unmapped') + mp.command_native({'disable-section', 'nodrag'}) mp.command_native({ 'enable-section', 'default', 'allow-hide-cursor+allow-vo-dragging'}) @@ -1278,6 +1282,7 @@ local function set_key_bindings() if not binding_state.bound then mp.command_native({'disable-section', 'default'}) + mp.command_native({'enable-section', 'nodrag'}) mp.add_forced_key_binding('MOUSE_MOVE', 'mouse_move') -- noisy mp.add_forced_key_binding( 'UNMAPPED', 'unmapped', handle_key, {complex = true}) -- cgit v1.2.3-70-g09d2