Skip to content

Add window-closed subscribe event - #48

Merged
vitorebatista merged 1 commit into
mainfrom
port/window-closed-subscribe
Jul 14, 2026
Merged

Add window-closed subscribe event#48
vitorebatista merged 1 commit into
mainfrom
port/window-closed-subscribe

Conversation

@vitorebatista

Copy link
Copy Markdown
Owner

Ports nikitabobko#2181.

Adds a window-closed event to aerospace subscribe, fired when a window is closed (includes windowId and workspace). Mirrors the fork's existing window-moved-to-workspace (#40) and workspace-layout-changed subscribe events.

The upstream PR touches the same event-registration files the fork already extended, so it was applied with git apply --3way and the additive conflicts resolved by union — the fork keeps workspace-layout-changed + window-moved-to-workspace and gains window-closed:

  • ServerEvent.swift — added windowClosed factory
  • SubscribeCmdArgs.swift — added ServerEventType.windowClosed case
  • subscriptions.swift — added to the non-broadcast-on-subscribe switch
  • MacWindow.swift — fires broadcastEvent(.windowClosed(...)) on close (applied clean)

Docs

  • docs/aerospace-subscribe.adoc — event list
  • grammar/commands-bnf-grammar.txt<event> rule

Test coverage

SubscribeCmdArgsTest updated with the new possible-values list.

  • ./build-debug.sh -Xswiftc -warnings-as-errors
  • ./swift-test.sh

🤖 Generated with Claude Code

Ports nikitabobko#2181. Unioned with the fork's existing
workspace-layout-changed and window-moved-to-workspace subscribe events.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vitorebatista
vitorebatista merged commit b75d01a into main Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant