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 - ALT-F4 does not generate an SDL_QUIT event on Windows
Summary: ALT-F4 does not generate an SDL_QUIT event on Windows
Status: RESOLVED WONTFIX
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: 1.2.13
Hardware: x86 Windows (XP)
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords: target-1.2.14
Depends on:
Blocks:
 
Reported: 2008-05-01 06:04 UTC by Christoph Kobe
Modified: 2009-09-26 23:51 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.