Skip to content

[macOS] Quitting the app does not raise AppWindow.Closing or Window.Closed #26075

Closed

Description

@ajpinedam

Current behavior 🐛

On the macOS desktop target, quitting the app with Cmd+Q, the application menu's Quit or the Dock's Quit ends it at once: AppWindow.Closing and Window.Closed are not raised. An app cannot cancel the quit (for example to ask about unsaved work), and work it does when its window closes does not run.

Closing the window with its close button raises both events, so the two ways of leaving the app behave differently.

Expected behavior 🎯

Quitting the app closes its windows as the user would: each window raises AppWindow.Closing, which can cancel the quit, and then Window.Closed.

How to reproduce it (as minimally and precisely as possible) 🔬

  1. Create an Uno Platform app with the desktop target and run it on macOS.
  2. On the main window, handle AppWindow.Closing (set args.Cancel = true) and Window.Closed, logging each.
  3. Press Cmd+Q, or use the application menu's Quit or the Dock's Quit.
  4. The app exits, and neither handler runs.

Workaround 🛠️

None from app code: the macOS host answers the quit in applicationShouldTerminate: before the app is involved.

Affected platforms 📱💻🖥️

Desktop (macOS)

Uno.Sdk version (and other relevant versions) 📦

Uno Platform master (7.1-dev).

IDE version 🧑‍💻

No response

Anything else we need to know? 💬

Found in an app that runs its shutdown work when its window closes. A fix is proposed in #26063.

Activity

  1. added
    triage/untriaged
    on Nov 5, 2026
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

    triage/untriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions