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
When the window is closed, AeroSpace receives two events from macOS:
The window is destroyed
The focused window is changed
The events system is unreliable in macOS. The events might come in whatever order, or sometimes the events might not be even delivered 🤷
AeroSpace logic relies neither on the nature of the events nor on their order. AeroSpace only uses events as a signal to "re-evaluate the world" (check if windows no longer exist, check if new windows are appeared, re-layout the windows)
And here comes the problem, whenever AeroSpace detects that the window is destroyed, AeroSpace issues a focus request to focus the previously focused window on the workspace of the destroyed window. We do so to keep the focused workspace focused (Pointer in the code: MacWindow.swift:garbageCollect). Unfortunately, AeroSpace plays a "race condition" game with the macOS that tries to focus next window of the app.
It leads to the following user facing issue: AeroSpace may lose the "race condition" #854#571
What is the proposed solution to fix the problem? I don't have one. I don't know. Until it's clear how to fix the issue, the issue exists for the documentation purposes.
When the window is closed, AeroSpace receives two events from macOS:
The events system is unreliable in macOS. The events might come in whatever order, or sometimes the events might not be even delivered 🤷
AeroSpace logic relies neither on the nature of the events nor on their order. AeroSpace only uses events as a signal to "re-evaluate the world" (check if windows no longer exist, check if new windows are appeared, re-layout the windows)
And here comes the problem, whenever AeroSpace detects that the window is destroyed, AeroSpace issues a focus request to focus the previously focused window on the workspace of the destroyed window. We do so to keep the focused workspace focused (Pointer in the code:
MacWindow.swift:garbageCollect
). Unfortunately, AeroSpace plays a "race condition" game with the macOS that tries to focus next window of the app.It leads to the following user facing issue: AeroSpace may lose the "race condition" #854 #571
What is the proposed solution to fix the problem? I don't have one. I don't know. Until it's clear how to fix the issue, the issue exists for the documentation purposes.
Also read the thread: #571
The text was updated successfully, but these errors were encountered: