Focus model

I’ve just noticed that one of my tools, AutoSelectInstrument, still works but steals focus from the pattern editor when I have the Instrument window undocked. Probably I can just remove some code that says pluginwindow.visible = true, and I haven’t even tested if renoises native option might now do enough for me, but maybe focus is a thing that should be available in the API?