[Top][All Lists]

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

bug#15029: 24.3; feature-request: add window-focus-lost-hook

From: Stefan Monnier
Subject: bug#15029: 24.3; feature-request: add window-focus-lost-hook
Date: Fri, 09 Aug 2013 09:54:56 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> post-command-hook is also used in narrow ways, and it doesn't
> cause anything strange to happen just because you move the mouse.

When I move the mouse from one frame to another, it generates
a `switch-frame' event, which is run by the perfectly normal command
handle-switch-frame, including running pre/post-command-hook.

> If I understand what mouse-autoselect-window does, it only causes
> switching windows -- it does not run Lisp code.

Same as above: runs pre/post-command-hook etc...

> What is a very useful application for running code when the mouse
> moves out of the Emacs frame?

Currently used to turn off the blink-cursor timer.
Other users want it to (auto-)save a file when its buffer/frame
loses focus.
Yet others want to change the frame's background color to indicate that
it has focus.


reply via email to

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