Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Windows] Application::Quit posts WM_QUIT before destroying windows

Open
#57 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
72/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
cpp

Research direction

Start in src/platform/windows/application_windows.cpp and trace Application::Quit() through the window teardown and message-loop handling. Check the behavior in a Flutter app, including a close handler that intercepts the system close button. Done means the windows and Flutter engine are destroyed while messages are still pumped, before WM_QUIT is posted, and the app exits promptly.

Written by the indexing model from the issue text.

Description

bug

On Windows, Application::Quit() ends in PostQuitMessage() (src/platform/windows/application_windows.cpp) without destroying the application's windows first.

window_manager had the same pattern in destroy(), and there it made apps take several seconds to exit, or stop responding, since Flutter 3.24. The window and the Flutter engine were torn down after the message loop had already stopped.

Expected: destroy the windows (so the Flutter view controller shuts down its engine while messages are still pumped), then post WM_QUIT. Needs checking in a Flutter app, including with a close handler that intercepts the system close button.

Background:

  • leanflutter/window_manager#478: destroy() takes several seconds (also #452)
  • leanflutter/window_manager#590: a PR that destroys the window before quitting the message loop
Dominant language
C++
Stars
34
Forks
7
Avg merge
3d 1h
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from libnativeapi/nativeapi

All issues in libnativeapi/nativeapi

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.