Keyboard Maestro 11.1.1, macOS 27.2.
My window-positioning macro uses the "Focused Window Changes" and "Focused Window's Frame Changed" triggers. It works for every app except two menu-bar apps: Lunar (7.0.0b50) and AlDente (1.40.3).
What happens:
- I click the app's menu-bar icon and choose Settings (Lunar) or Dashboard (AlDente).
- The window opens. macOS makes the app frontmost (NSWorkspace frontmostApplication), and the window is the app's AXFocusedWindow (read through System Events).
- Neither Focused Window trigger fires. The Engine log shows nothing.
- When I then switch back to the app I was in before, the trigger does not fire either.
- %WindowName%1% and %Application%1% give the window and app that were in front before, not the menu-bar app's window.
What makes these two apps different:
- Moom and Wispr Flow are other menu-bar apps that I use, and the trigger fires for them. Both show a Dock icon while their window is open.
- Lunar and AlDente show no Dock icon while their window is open.
- Lunar has an option to show its Dock icon all the time. With it on, the trigger fires every time Settings opens (5 of 5 tests).
- Each app uses the same window (and by extension Window ID) every time. When I close it, the app only hides it. When I open it again, the app shows the same window again.
Questions:
1 Is this expected for Menubar apps without a Dock icon?
2 @peternlewis could the Focused Window triggers (and the front-window tokens) be changed to fire for them, since macOS itself reports them as frontmost with a focused window?