Closed patricorgi closed 1 month ago
It happens because Discord instead of closing windows uses "hide application" macOS feature. See #77
AeroSpace could hardcode this knowledge about Discord misbehavior and run the on-window-detected
callback every time Discord application unhides. But it will surprise people who directly use "hide application" on Discord, so I don't think that it could be fixed on AeroSpace side, it's a Discord bug.
On the related note, in the next version, windows will preserve their workspace assignment even when hidden #425 which might be coincidentally the behaviour you want.
Hi @nikitabobko , many thanks for the explanation. It makes sense to me now. My apologies for forgetting to search in the closed issues, otherwise I would not have created this duplicate.
In case someone is also looking for a solution. I found a very good workaround for now: uninstall the official Discord app and use Safari Web App instead. It works seamlessly the same.
AeroSpace has been doing great job with
if.app-id = "blabla"
on window detection, for all my applications except for Discord and Mattermost.Instead of moving the new window from these two apps to the designated workspace, it considered the new window from my last application. To be more accurate, if I open Discord while I'm in Safari, it will consider Discord window as a new Safari window, and move it according to my rules set for new Safari window.
Even worse, if I now try to immediately manually move Discord window using the keymap I set
alt-shift-q = 'move-node-to-workspace Q'
. It will end up moving my Safari window, despite the Discord window is focus and frontmost.Same thing happens to my another application Mattermost, which is a Slack-like app (I don't want to get to the details here).
I don't know what are the similarity between Discord and Mattermost. I thought it may be because they are both Electron apps, but my other Electron apps are fine with AeroSpace.
Checklist