emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bikeshedding go! Why is <M-f4> unbound?


From: Stefan Monnier
Subject: Re: Bikeshedding go! Why is <M-f4> unbound?
Date: Thu, 13 Jan 2011 11:57:14 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> When Alt-F4 is pressed, the event is sent to the application as any
> other keypress. The application can handle the event as it pleases
> (that's the case of Emacs) or delegate the handling of that event to
> Windows, which performs standard actions for certain well-known
> events. But please note that the event is sent to the application first
> and the OS executes the standard associated action only when the
> application delegates the event handling to it. This differs from KDE,
> which handles Al-F4 and Emacs never sees it

> This is the typical event loop of a Windows application (pseudocode):

> switch(event) {
> case foo: do_something(); break;
> case bar: do_something_else(); break;
> /* More case's for all events we are interested on */
> ...
> /* Let Windows handle all the rest: */
> default: let_Windows_process_it()
> }

> When Alt-F4 is delegated to Windows, it generates events for closing the
> active window.

Thanks.  So the right thing to do here is to change Emacs so it delegates
the Alt-F4 to the standard Windows routine that turns it into a WM_CLOSE.
Patch welcome,


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]