[SDL] Alt-F4 not working on Windows
Mason Wheeler
masonwheeler at yahoo.com
Sat May 3 10:46:01 PDT 2008
----- Original Message ----
From: Christoph Kobe <christoph at kobenetz.de>
To: sdl at libsdl.org
Sent: Saturday, May 3, 2008 9:47:43 AM
Subject: Re: [SDL] Alt-F4 not working on Windows
>My main question still is: Why is ALT-F4 in the SDL not generating a WM_DESTROY event? With every
>other program this is working fine, so there has to be something that prevents the event. I'm not insisting
>that this is a bug (although I think so) but I'm asking WHY.
Because SDL hooks the keyboard input at a low enough level that it receives the keypresses before the window manager does. <ALT>-<F4> is defined as a menu shortcut for the Close command in the window's system menu, and then the Close command generates a WM_DESTROY message. But since the window manager never gets the keypress, the shortcut can't be activated. (Opening the system menu with the mouse and selecting Close works just fine.)
More information about the SDL
mailing list