Skip to content

Conversation

takase1121
Copy link
Contributor

The problem
Windows. Windows is the problem.
#8129

This PR takes the QT method of sending WM_CLOSE to all application window, then send WM_CLOSE to the main thread of the child process.

Description

Windows always makes things more complicated.
On Windows, there are multiple ways to gracefully terminate a process.

  1. Send WM_CLOSE to a Window.
  2. Send Ctrl+Break event with GenerateConsoleCtrlEvent.

None of these two ways cover all applications - WM_CLOSE only works when the program has a message loop like in GUI programs, GenerateConsoleCtrlEvent has quirks.

Existing Issue(s)

@slouken slouken added this to the 3.4.0 milestone May 25, 2025
@slouken slouken merged commit 95c44dc into libsdl-org:main Aug 27, 2025
41 checks passed
@slouken
Copy link
Collaborator

slouken commented Aug 27, 2025

Merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants