Skip to content

Commit 062c7e7

Browse files
committed
devel/dflayout: use a global for visible_when_not_focused
Using a local was causing it to revert and get "stuck on" when re-running the script.
1 parent 462fde5 commit 062c7e7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

devel/dflayout.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ local utils = require('utils')
1212
---@field views gui.View[] list of views to add to main ZScreen
1313
---@field update fun() called by main window to recompute demo frames
1414

15-
local visible_when_not_focused = true
16-
function demos_are_visible()
15+
if visible_when_not_focused == nil then
16+
visible_when_not_focused = true
17+
end
18+
local function demos_are_visible()
1719
if not screen then return false end
1820
if visible_when_not_focused then return true end
1921
return screen:isActive() and screen:hasFocus()

0 commit comments

Comments
 (0)