Repository navigation
Description
Context
Line numbers are at 296c3f5 (main). One of the two milestones #86 was closed to be split into; this is the Windows and Linux one. The macOS forced-quit milestone is filed separately.
Scope.OnQuitRequest runs "on macOS" only (core/quit.go:61, desktop/app.go:82); docs/public/en/testing.md:52 says a Quit menu item "quits at once on Windows and Linux". The Windows and Linux backends have no quit request:
- Windows: the Quit menu role posts
WM_CLOSEto the root window (internal/platform/windows/chrome.go:1029-1035), andItemQuitends the loop (internal/platform/windows/windows.go:1363); nothing dispatchesEventQuitRequest. There is no handling ofWM_QUERYENDSESSION/WM_ENDSESSION, so a logout or shutdown is not seen at all. - Linux: the Quit menu role closes the primary window (
internal/platform/linux/input.go:1073-1078),ItemQuitcloses the window (internal/platform/linux/linux.go:1016-1019), and there is no session-end handling (GTK'sGApplicationquery-end, or the XDG session inhibit portal). - Closing the primary window (
EventWindowClose,windows.go:2215,linux.go:751,:1374) asksOnClosing, which is a different question from quitting: a tray app may close its window and keep running.
#86's closing comment lists what has to be consistent: primary-window close and MenuQuit routing, Alt+F4, tray Quit, and native target tests.
Why it matters
An app that asks before quitting while it has unsaved work or a running job can only do so on macOS; on Windows and Linux its Quit item, its tray's Quit and a logout end it at once. Kando asks before a quit ends a running job, which on Windows and Linux it can do only from the Quit menu items whose OnSelect it handles itself; a tray's Quit or a logout ends the job without a word.
Proposal
- Windows and Linux dispatch
EventQuitRequestfor the Quit menu role,ItemQuitfrom a tray menu, and the app's owndesktopQuit, and quit only once the handlers approve, withDeferas on macOS. - Closing the primary window keeps going through
OnClosing; when that close would end the app (no tray, no other window), it is then also a quit request, so Alt+F4 on the last window and Cmd+Q on macOS reach the same handlers. - A logout or shutdown is a forced quit (
QuitRequest.Forced()from the macOS milestone): on WindowsWM_QUERYENDSESSIONanswers TRUE andWM_ENDSESSIONrunsOnQuitwithinQuitTimeout; on Linux the session's end signal does the same. A forced quit cannot be cancelled. - The docs drop "on macOS" from
OnQuitRequest, and nsgotest's headless Quit role asks the handlers on all three desktops.
Acceptance
- On Windows and Linux, the Quit menu item, a tray menu's Quit and closing the last window (Alt+F4) run
OnQuitRequest's handlers, and a handler can cancel or defer them. - Logout and shutdown run
OnQuitand never wait for a handler's answer. -
-target windowsand-target linuxtests cover a cancelled and an approved request.
Activity
houko commentedon Nov 22, 2026
Audit complete. The Windows and Linux quit-request scope shipped in PR #1197, which routes desktop and tray Quit through
OnQuitRequest, handles deferred approval and forced session-end paths, and passed its focused Windows/Linux checks. The issue is already closed by that merged implementation.