unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* focus-in-hook ---fires incorrectly?
@ 2018-03-26 17:20 T.V Raman
  2018-03-26 17:44 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: T.V Raman @ 2018-03-26 17:20 UTC (permalink / raw)
  To: emacs-devel


this is on emacs built from Git @head running on Debian under StumpWM
as a window-manager.

Try:

(add-hook 'focus-in-hook #'(lambda () (message "hello %s" (selected-frame))))

What you'd expect:

1. See "hello <frame-id>" when Emacs frames receive focus.
2. Nothing when Emacs loses focus.

What Actually Happens:

Hook fires when emacs loses focus, and you see "Hello <frame-id>"
where frame-id is the id of selected frame in emacs
2. You get "hello" when Emacs receives focus  -- with no frame-id.

Note that the corresponding focus-out-hook appears to work correctly
i.e. only fires when Emacs loses focus.

-- 

-- 

-- 

-- 



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-03-28 12:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-26 17:20 focus-in-hook ---fires incorrectly? T.V Raman
2018-03-26 17:44 ` Eli Zaretskii
2018-03-26 18:00   ` T.V Raman
2018-03-26 20:09   ` Michael Heerdegen
2018-03-28 12:37     ` Noam Postavsky

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).