Skip to content

fix(desktop): let macOS system quit bypass background close#3203

Merged
esengine merged 1 commit into
main-v2from
codex/fix-macos-system-quit-background
Jun 5, 2026
Merged

fix(desktop): let macOS system quit bypass background close#3203
esengine merged 1 commit into
main-v2from
codex/fix-macos-system-quit-background

Conversation

@SivanCola

Copy link
Copy Markdown
Collaborator

Summary

  • mark macOS system-level Quit requests before Wails runs OnBeforeClose
  • let Dock Quit, app menu Quit, and Command-Q bypass the close-to-background preference
  • keep ordinary window close behavior unchanged and covered by a regression test

Tests

  • cd desktop && go test ./...

@github-actions github-actions Bot added the v2 Go rewrite (1.x) — main-v2 branch, active development label Jun 5, 2026
@SivanCola

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@esengine esengine left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

macOS 系统退出(Dock/菜单/Cmd-Q)经 applicationShouldTerminate: + WailsContext.Quit 双重 swizzle 置标记,beforeClose 消费后放行;普通关闭后台行为不变并有回归测试。平台约束靠 _darwin 文件名后缀,三平台 CI 全绿。合并。

@esengine esengine merged commit fea1d66 into main-v2 Jun 5, 2026
9 checks passed
@esengine esengine deleted the codex/fix-macos-system-quit-background branch June 5, 2026 07:36
esengine added a commit that referenced this pull request Jun 5, 2026
Add a desktop close-to-tray option: closing the window can hide to a tray icon (Windows/Linux menu with Open/Quit, platform guards) instead of quitting. Rebased onto main-v2 with the macOS system-quit hook (#3203) — both run at startup; beforeClose keeps system-quit bypass ahead of close-to-background.

Original author: @wade19990814-hue.

Closes #3030
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants