all messages for Emacs-related lists mirrored at yhetil.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.