mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
89efe820a8
commit
48f3a26746
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue