1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-29 02:22:19 +00:00
mpv/player/lua
Dudemanguy bca516bd2c osc: don't spam window-controls bindings on every render
Not sure when this actually started happening, but it's probably been
like this for years. Currently, the logic for the window-controls works
by simply checking if the osc is visible and then either enabling or
disabling the associated keybindings. The problem is that this can just
constantly spam mp.enable_keybindings/disable_key_bindings on every
single render call if the user disables the border at any point in time.
This does a lot of pointless work and also results in the logs being
spammed with lines like "disable-section". Clearly, this should just
work like the code for checking the input keybindings just above it.
Keep track of an internal state variable and check when it doesn't match
the osc visibility. In that case, we can then either enable or disable
the key bindings and just update the variable.
2022-11-29 16:40:36 +00:00
..
assdraw.lua osc: improve look of seekranges 2019-09-02 01:11:04 +03:00
auto_profiles.lua auto_profiles.lua: don't warn if profile-restore=default 2022-01-30 15:13:10 +02:00
console.lua console: add history deduplication 2022-11-03 13:30:58 +01:00
defaults.lua lua: command_native_async: make the callback optional 2022-06-22 14:44:52 +03:00
options.lua options.lua: remove unused function 2022-04-08 19:20:49 +03:00
osc.lua osc: don't spam window-controls bindings on every render 2022-11-29 16:40:36 +00:00
stats.lua various: remove trailing whitespace 2022-05-14 14:51:34 +00:00
ytdl_hook.lua ytdl_hook: reverse order of tracks 2022-11-01 09:54:33 -04:00