| Summary: | ALT+F4 does not produce a SDL_WINDOWEVENT_CLOSE event on Win, neither CMD+Q on OSX | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Gabriel Jacobo <gabomdq> |
| Component: | events | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | daniel, sebastien.lussier |
| Version: | 2.0.1 | ||
| Hardware: | All | ||
| OS: | Windows (All) | ||
| Attachments: | Let DefWinProc handle keypresses | ||
|
Description
Gabriel Jacobo
2012-07-23 16:58:42 UTC
Created attachment 911 [details]
Let DefWinProc handle keypresses
*** This bug has been marked as a duplicate of bug 1320 *** Reopened, since this bug was marked as a duplicate of the same issue under OS X, and was closed without integrating the patch for Windows provided by Gabriel Jacobo. Issue is still present in SDL 2.0.1 As it is now, SDL correctly handles the quit shortcut under OS X (according to the linked bug) and under Linux / X11 (via the WM), but SDL users still need an OS-specific hack for Windows. In #576 slouken decided not to change this behavior for SDL 1.2, but can this please be reconsidered for SDL 2, especially now that it has been fixed for the other desktop platforms? Have you tried this patch to see what other side effects this might have? I think the side effect will be that all keyboard shortcuts on Windows start having their default behaviour...which is a ... good thing? Here's a list: http://support.microsoft.com/kb/126449 Not a good thing? Here's a report from James Haley about this on SDL 1.2: We’ve had some problems in the Eternity Engine and Chocolate Doom projects after switching over to use the windib driver by default where Windows’ alt+space key combo starts causing the system menu to open, which locks up the program and causes any currently pressed keys to become stuck in the “down” state once the menu is closed. This is a serious problem for DOOM, Heretic, Hexen, Strife, and Duke 3D based projects as the default control scheme for those games places “use” on spacebar and “strafe” on ALT. This means trying to use something while running at an angle pulls you out of the game and, if the modal menu loop lasts long enough, can disconnect network games. -- Maybe we can manually handle Alt-F4? Should be fixed now: https://hg.libsdl.org/SDL/rev/1b49b680f319 |