We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 576

Summary: ALT-F4 does not generate an SDL_QUIT event on Windows
Product: SDL Reporter: Christoph Kobe <christoph>
Component: eventsAssignee: Sam Lantinga <slouken>
Status: RESOLVED WONTFIX QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: tim
Version: 1.2.13Keywords: target-1.2.14
Hardware: x86   
OS: Windows (XP)   

Description Christoph Kobe 2008-05-01 06:04:02 UTC
Pressing ALT-F4 to close an SDL window does not work. No SDL_QUIT event is generated.

On Windows ALT-F4 is used to send a WM_DESTROY message to a window so the application can terminate. I've looked into SDL_sysevents.c and found out that no WM_DESTROY event is generated when pressing ALT-F4.

This probably has something to do with grabbing keyboard input.

The release notes of version 1.2.10 say:

Pressing ALT-F4 now delivers an SDL_QUIT event to SDL applications.

But unfortunatly this isn't true even for 1.2.10.
Comment 1 Ryan C. Gordon 2009-09-13 16:33:27 UTC
Tagging this bug with "target-1.2.14" so we can try to resolve it for SDL 1.2.14.

Please note that we may choose to resolve it as WONTFIX. This tag is largely so we have a comprehensive wishlist of bugs to examine for 1.2.14 (and so we can close bugs that we'll never fix, rather than have them live forever in Bugzilla).

--ryan.
Comment 2 Tim Angus 2009-09-17 03:11:53 UTC
c.f. bug #619.
Comment 3 Sam Lantinga 2009-09-26 23:51:40 UTC
I'm hesitant to change behavior at this point in SDL 1.2 development.  You're always welcome to catch ALT-F4 yourself and shut down the application.