You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: I have encountered this issue in a number of applications, and I will include a schematic fix for it. I am not enough of a Mac developer to be able to implement a Pull Request at the moment, though.
Device model, version and app version
Model Name: A1534 (MacBook Retina, 12-inch, 2017)
macOS Version: 13.2 (22D49)
App Version: 2023.460
Safari Version: Version 16.3 (18614.4.6.1.5)
Home Assistant Core Version: 2023.8.3
Describe the bug
When the Home Assistant application is set to Menubar only, windows spawned by the application do not behave like foreground windows.
To Reproduce
In the Home Assistant application, from the Menubar, open the "Home Assistant" menu and select "Preferences".
In the Preferences window, click "Show App In..." and select "Menu Bar".
Press Cmd-Tab twice.
Note that the second Cmd-Tab does not return you to the Home Assistant application, because it no longer registers as a foreground application.
Also note that when you manually click on a Home Assistant window, it no longer consistently shows the Menubar menus associated with the Home Assistant application.
The only way I can find to show the Home Assistant Menubar menus in this mode is to click on the Home Assistant window, three-finger swipe to another Space, then three-finger swipe back, but this behavior is probably a macOS bug, since Menubar-only applications are not supposed to have Menubar menus.
Expected Behavior
When the Home Assistant application is set to Menubar only, windows spawned by the application should behave like foreground windows.
Proposed Fix
Note: these code snippets are in Objective-C, but it shouldn't be too difficult to write the equivalent functions in Swift.
When the Home Assistant application is set to Menubar only, each time the application spawns a window it should run the following commands:
What these commands do is when the otherwise Menubar-only application spawns any windows, it quietly transforms from from a Menubar-only application to a Dock-and-Menubar application, and then when all the windows are closed, it quietly transforms back into a Menubar-only application.
The reason this behavior is important is that windows belonging to Menubar-only applications do not behave like normal application windows, which can cause problems like the windows not being available in Cmd-Tab and the application's Menubar menus not being consistently available (which, in this case, could make it difficult for the user to reopen the Preferences, essentially trapping them in Menubar-only mode).
While it might initially make sense for a Menubar-only application not to behave like a foreground application, once that application's UI goes beyond just a Menubar dropdown menu and starts involving persistent windows, the behavior of said windows can be jarringly inconsistent with user interface norms. For this reason, Menubar-only applications should quietly transform into foreground applications when any persistent windows are open on screen, rather than being strictly Menubar-only at all times.
Note that at my suggestion this behavior has been implemented in the application Tot, and I have an open Pull Request implementing it in Nextcloud Desktop. I have also proposed this behavior for Beeper (to allow it to run in the background), but running the above commands from an Electron application is non-trivial (and implementing it in Qt for Nextcloud Desktop was itself an overly complicated ordeal). Implementing this behavior in Home Assistant should be substantially more straightforward due to Home Assistant being a native application written in Swift.
The text was updated successfully, but these errors were encountered:
Device model, version and app version
Describe the bug
When the Home Assistant application is set to Menubar only, windows spawned by the application do not behave like foreground windows.
To Reproduce
Note that the second Cmd-Tab does not return you to the Home Assistant application, because it no longer registers as a foreground application.
Also note that when you manually click on a Home Assistant window, it no longer consistently shows the Menubar menus associated with the Home Assistant application.
Expected Behavior
When the Home Assistant application is set to Menubar only, windows spawned by the application should behave like foreground windows.
Proposed Fix
When the Home Assistant application is set to Menubar only, each time the application spawns a window it should run the following commands:
Then, when all of the windows have been closed, the application should run the following commands:
What these commands do is when the otherwise Menubar-only application spawns any windows, it quietly transforms from from a Menubar-only application to a Dock-and-Menubar application, and then when all the windows are closed, it quietly transforms back into a Menubar-only application.
The reason this behavior is important is that windows belonging to Menubar-only applications do not behave like normal application windows, which can cause problems like the windows not being available in Cmd-Tab and the application's Menubar menus not being consistently available (which, in this case, could make it difficult for the user to reopen the Preferences, essentially trapping them in Menubar-only mode).
While it might initially make sense for a Menubar-only application not to behave like a foreground application, once that application's UI goes beyond just a Menubar dropdown menu and starts involving persistent windows, the behavior of said windows can be jarringly inconsistent with user interface norms. For this reason, Menubar-only applications should quietly transform into foreground applications when any persistent windows are open on screen, rather than being strictly Menubar-only at all times.
Note that at my suggestion this behavior has been implemented in the application Tot, and I have an open Pull Request implementing it in Nextcloud Desktop. I have also proposed this behavior for Beeper (to allow it to run in the background), but running the above commands from an Electron application is non-trivial (and implementing it in Qt for Nextcloud Desktop was itself an overly complicated ordeal). Implementing this behavior in Home Assistant should be substantially more straightforward due to Home Assistant being a native application written in Swift.
The text was updated successfully, but these errors were encountered: