From ceaa56e214442de55d6926fe642704b8fdac091d Mon Sep 17 00:00:00 2001 From: cyl0 <83499175+cyl0@users.noreply.github.com> Date: Tue, 1 Mar 2022 23:42:45 +0800 Subject: [PATCH 1/2] Merge upstream merged upstream from https://github.com/mpv-player/mpv/commit/89efe82 --- mordenx.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mordenx.lua b/mordenx.lua index 544ef0f..7cacbf4 100644 --- a/mordenx.lua +++ b/mordenx.lua @@ -1800,7 +1800,14 @@ function render() end -- init management - if state.initREQ then + if state.active_element then + -- mouse is held down on some element - keep ticking and igore initReq + -- till it's released, or else the mouse-up (click) will misbehave or + -- get ignored. that's because osc_init() recreates the osc elements, + -- but mouse handling depends on the elements staying unmodified + -- between mouse-down and mouse-up (using the index active_element). + request_tick() + elseif state.initREQ then osc_init() state.initREQ = false From 6134c7d9913c288aa8840391f5a9770e2d927b76 Mon Sep 17 00:00:00 2001 From: cyl0 <83499175+cyl0@users.noreply.github.com> Date: Tue, 1 Mar 2022 23:47:21 +0800 Subject: [PATCH 2/2] Merge upstream Upstream fix from https://github.com/mpv-player/mpv/commit/48f3a26 --- mordenx.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mordenx.lua b/mordenx.lua index 7cacbf4..8d0830b 100644 --- a/mordenx.lua +++ b/mordenx.lua @@ -2023,8 +2023,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 function show_logo()