From 48f3a267460f8ca2355a8168e0694e7251b2f5d3 Mon Sep 17 00:00:00 2001 From: "Avi Halachmi (:avih)" Date: Sun, 20 Jun 2021 17:27:30 +0300 Subject: 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. --- player/lua/osc.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3