Skip to content

Commit c5fe186

Browse files
committed
Fix windows closing bug
1 parent e423056 commit c5fe186

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

brute-seq.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ end
164164
local function loop()
165165
passThroughShortcuts(ctx)
166166
reaper.ImGui_SetNextWindowSize(ctx,900,420,reaper.ImGui_Cond_FirstUseEver())
167-
if reaper.ImGui_Begin(ctx,'brute-seq',true) then
167+
visible, open = reaper.ImGui_Begin(ctx,'brute-seq',true)
168+
if visible then
168169
reaper.ImGui_PushFont(ctx,font)
169170
reaper.ImGui_PushStyleColor(ctx,reaper.ImGui_Col_WindowBg(),0x222222FF)
170171

@@ -297,6 +298,8 @@ local function loop()
297298
reaper.ImGui_PopFont(ctx)
298299
end
299300
reaper.ImGui_End(ctx)
300-
reaper.defer(loop)
301+
if open then
302+
reaper.defer(loop)
303+
end
301304
end
302305
loop()

0 commit comments

Comments
 (0)