diff options
| author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2026-01-20 11:30:39 -0800 |
|---|---|---|
| committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2026-01-20 11:30:39 -0800 |
| commit | bc33649c68238f5a4c602a8cc234ba24db678ad3 (patch) | |
| tree | 58e227b275a3d35e8cb9d379ad8ebe4cea289856 | |
| parent | 50021f8d850b81e7ec27b0e048dafb693fb49a6c (diff) | |
| download | mpv-iptv-menu-bc33649c68238f5a4c602a8cc234ba24db678ad3.tar.gz mpv-iptv-menu-bc33649c68238f5a4c602a8cc234ba24db678ad3.tar.xz | |
disable VO dragging while menu is open
| -rw-r--r-- | main.lua | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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}) |
