summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvi Halachmi (:avih) <avihpit@yahoo.com>2021-06-20 17:27:30 +0300
committerAvi Halachmi (:avih) <avihpit@yahoo.com>2021-06-20 17:37:47 +0300
commit48f3a267460f8ca2355a8168e0694e7251b2f5d3 (patch)
treeea7b410447b9808156ce520b26fd0e3a4ae4d8ef
parent89efe820a8f1938246f6a619e027fb3067d661e9 (diff)
downloadmpv-48f3a267460f8ca2355a8168e0694e7251b2f5d3.tar.bz2
mpv-48f3a267460f8ca2355a8168e0694e7251b2f5d3.tar.xz
osc: ensure tick after any mouse-event
Previously tick() was ensured unconditionally only after mouse-move, but there are other mouse-events which need re-rendering (tick), like mouse-down (icons may get grayed-out) or mouse-up (icons may change). For instance: mpv --pause --myclip.mkv then move the mouse over the volume/mute OSC button, then - without moving the mouse - press and release the left mouse button. The osc was not re-rendered because it's paused and the mouse didn't move, so the volume icon didn't get grayed-out when held down, and the icon doesn't change on mouse-up (to reflect the new mute state). Now both these changes are rendered correctly.
-rw-r--r--player/lua/osc.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua
index 3c9337da8e..8701f4acd0 100644
--- a/player/lua/osc.lua
+++ b/player/lua/osc.lua
@@ -2486,8 +2486,10 @@ function process_event(source, what)
if element_has_action(elements[n], action) then
elements[n].eventresponder[action](elements[n])
end
- request_tick()
end
+
+ -- ensure rendering after any (mouse) event - icons could change etc
+ request_tick()
end