ITADN

AeroSpace manages cmux menu-bar AX window with invalid window ID 0

#2169Closednikitabobko 创建于 2026-07-11
bug
N
nikitabobkocommented
When cmux is running, AeroSpace registers an auxiliary menu-bar accessibility surface as a managed window: ```text ❯ aerospace list-windows --workspace focused 0 | cmux | Item-0 18213 | cmux | ~/IdeaProjects/cmux ``` `18213` is the actual cmux terminal window. `Item-0` is a separate 34×33 accessibility dialog at the menu-bar edge. ## Expected behavior AeroSpace should ignore AX elements whose Core Graphics window ID is `0` (`kCGNullWindowID`). Apple documents `kCGNullWindowID` as a [guaranteed invalid window ID](https://developer.apple.com/documentation/coregraphics/kcgnullwindowid). ## Diagnostic output ```text com.cmuxterm.app.0 ||| "AXFrame" : ... w:34.000000 h:33.000000 com.cmuxterm.app.0 ||| "AXRole" : "AXWindow" com.cmuxterm.app.0 ||| "AXSubrole" : "AXDialog" com.cmuxterm.app.0 ||| "AXTitle" : "Item-0" com.cmuxterm.app.0 ||| "AXCloseButton" : null com.cmuxterm.app.0 ||| "Aero.axWindowId" : 0 com.cmuxterm.app.0 ||| "Aero.treeNodeParent" : "Optional(AppBundle.FloatingWindowsContainer)" com.cmuxterm.app.0 ||| "Aero.windowLevel" : null ``` The same app exposes the actual terminal as: ```text AXUIElement(AxWindowId=18213, title="~/IdeaProjects/cmux", role="AXWindow", subrole="AXStandardWindow") ``` ## Fix During AX window discovery and liveness checks, treat `kCGNullWindowID` the same as a missing window ID and do not register it. ## Environment ```text AeroSpace: 0.21.1-Beta cfd4eab235b254ff5f1a1b9180a3997ae060162a macOS: 26.5.2 (25F84) cmux: 0.64.17 (build 97) Bundle ID: com.cmuxterm.app ``` _Originally posted by @a-mountain in https://github.com/nikitabobko/AeroSpace/discussions/2166_
关闭于 2026-07-16 1 条评论