#10161·t3code

Windows desktop app abruptly quits on closing last tab with Ctrl+W; align behavior with macOS via System Tray

Author: SXP-SimonCreated Sep 5, 2026Updated Sep 27, 2026

Summary

On Windows (installed via .exe), pressing Ctrl+W when no editor tabs or terminals are open (or closing the last remaining tab) abruptly terminates the entire desktop application process without any confirmation or warning.

Motivation & Context

  • Discrepancy with macOS: On macOS, closing windows via Cmd+W leaves the application active in the Dock / Tray, which allows reopening or restoring the application without terminating the background process.
  • Accidental Closure: In Windows editor workflows, users frequently hit Ctrl+W to close tabs in succession. When the last tab closes, Ctrl+W directly kills the entire app and drops running background processes.
  • Dedicated Exit Mechanism: T3 Code already provides a deliberate double Ctrl+Q gesture to exit the application cleanly.

Proposed Solution

  1. Introduce native System Tray support on Windows with a context menu (Open / Quit) and click/double-click activation.
  2. Update DesktopLifecycle to keep the background process alive on Windows upon window-all-closed, mirroring the macOS experience.

I have prepared a PR to address this cleanly.