Skip to content

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

Description

@SXP-Simon

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.

Activity

  1. angusm73 commented on Sep 10, 2026

    @angusm73

    Related: #11069 adds File → New Window and ⌘N / Ctrl+N to reopen or focus the main window, addressing the macOS reopening problem reported in #435.

    It leaves Windows/Linux last-window-close behavior unchanged, so it does not resolve this issue or add tray support. Keeping the host alive after closing its last window would still need a separate change.

  2. kaaboaye commented on Sep 16, 2026

    @kaaboaye

    The same issue also occurs on Linux: pressing Ctrl+W closes the entire application without any warning or confirmation.

  3. dannyfranca commented on Sep 27, 2026

    @dannyfranca

    +1 on this one, very much needed

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions