From cc0ff6a93dd3635425e6c4604868eb739c5a8348 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Fri, 13 Jan 2023 12:16:49 -0800 Subject: [PATCH] raise trigger lock screens (if possible) so they don't get stuck under new viewscreens and become lost (and therefore overlay will be forever locked) --- plugins/lua/overlay.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/lua/overlay.lua b/plugins/lua/overlay.lua index 4fc375d72..42116735a 100644 --- a/plugins/lua/overlay.lua +++ b/plugins/lua/overlay.lua @@ -43,7 +43,12 @@ end local function triggered_screen_has_lock() if not trigger_lock_holder_screen then return false end - if trigger_lock_holder_screen:isActive() then return true end + if trigger_lock_holder_screen:isActive() then + if trigger_lock_holder_screen.raise then + trigger_lock_holder_screen:raise() + end + return true + end return register_trigger_lock_screen(nil, nil) end @@ -429,9 +434,8 @@ local function _update_viewscreen_widgets(vs_name, vs, now_ms) return now_ms end --- not subject to trigger lock since these widgets are already filtered by --- viewscreen function update_viewscreen_widgets(vs_name, vs) + if triggered_screen_has_lock() then return end local now_ms = _update_viewscreen_widgets(vs_name, vs, nil) _update_viewscreen_widgets('all', vs, now_ms) end