Skip to content

Commit

Permalink
only works for docked feedback window
Browse files Browse the repository at this point in the history
  • Loading branch information
myrrc committed Jul 12, 2024
1 parent 4c68f58 commit 01aa4ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions internal/gui/feedback/controller.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ function feedback.update()
reaper.ShowMessageBox(startup_msg, "Reaper Keys Open Message", 1)
end

-- o or O on first track don't focus rename field
-- defocus window, otherwise, most commands won't work
-- reaper.Main_OnCommand(reaper.NamedCommandLookup("_BR_FOCUS_TRACKS"), 0)

model.setKeys({ open = true })

if config.profile then
Expand Down
4 changes: 4 additions & 0 deletions internal/state_machine/state_machine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ local function input()

feedback.displayState(new_state)
feedback.update()

-- This works only when window is docked, nothing we can do otherwise
local defocus_window = section_id == 0 and "_BR_FOCUS_TRACKS" or "_SN_FOCUS_MIDI_EDITOR"
reaper.Main_OnCommand(reaper.NamedCommandLookup(defocus_window), 0)
end

return input

0 comments on commit 01aa4ec

Please sign in to comment.