[SDL] Alt-F4 not working on Windows
Bob Pendleton
bob at pendleton.com
Sat May 3 17:03:20 PDT 2008
Can we just drop this whole thing? Seriously, this is too weird to
believe....
No? Ok, everyone who disagrees with me is a NAZI!
Now, I invoke Godwin's law and proclaim this over and moot. :-)
Bob Pendleton
On Sat, May 3, 2008 at 6:47 PM, Bill Kendrick <nbs at sonic.net> wrote:
> On Sat, May 03, 2008 at 05:36:21PM +0100, Graham Houston wrote:
> > And if I want ALT-F4 on Windows to not close the window but do something
> > else ?? im buggered!!
> >
>
> Holy crap, people. Can't we all just get along? And by "get along,"
> I mean: I suggest we DO have SDL support ALT+F4 keypresses. It keeps MY
> life
> simple. (I don't have to add "#ifdef WINDOWS if (event.type ==
> yadayada...)"
> in every event loop of every app, when I'm _already_ doing
> "if (event.type == SDL_QUIT)")
>
> For those of you who feel 'buggered' by adding this functionality to SDL,
> which, again, I feel _keeps programmers' lives simple_, we should add an
> API or env var that determines whether SDL listens out for ALT+F4 on
> Windows
> (and whatever else some OS might dream up that it'd be a kluge to handle
> in our own code).
>
>
> > if this was to be implemented in SDL then you can bet your ass than many
> > programs that already exist and use ALT-F4 for other reasons will not
> work
> > as expected.. instead of doing what was intended of the combo it quits
> the
> > program!!! this would be a bug!!
>
> This is why, for historical/compatibility reasons, at least under SDL 1.2,
> the _default_ behavior should be: "pass the ALT+F4 along to the event queue
> as keypresses." The _enhanced_ behavior, which 99% of people would want
> to enable, should be "listen for ALT+F4 on Windows and send SDL_QUIT
> event".
>
>
> > and on other systems its the same story regardless you mixing up user
> > interface ethics with bugs here! if you want ALT-F4 to call WM_DESTROY
> > catch the combo and pump the SDL_QUIT event.
>
> Or... let SDL do that for us, so that three lines of #ifdef'd code doesn't
> need to pollute everyone's app-level code. :D
>
> --
> -bill!
> bill at newbreedsoftware.com
> http://www.newbreedsoftware.com/
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
--
+ Bob Pendleton: writer and programmer
+ email: Bob at Pendleton.com
+ web: www.GameProgrammer.com
+ www.Wise2Food.com
+--------------------------------------+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20080503/a611da0e/attachment.htm>
More information about the SDL
mailing list