unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* [24.5.1] Inquiry request about emacs focus hooks
@ 2015-09-20 11:17 Skorzhinskiy Mikhail
  0 siblings, 0 replies; only message in thread
From: Skorzhinskiy Mikhail @ 2015-09-20 11:17 UTC (permalink / raw)
  To: help-gnu-emacs


I'm heavy user of powerline (https://github.com/milkypostman/powerline)
package and experience troubles with it. This package provides
possibility to change color of the modeline depending on the focus. All
inactive frames become gray except the focused one.

But when I tried to use this feature with two frames, I've got this:
http://i.imgur.com/ke3t4Gc.gif. In short, the powerline package says that
previously selected frame is active, despite the fact that it is not.

I've tried to find out why it is happening and discovered that powerline
package have one function that selects active window by calling
(frame-selected-window), and this function called as a handler of hooks
(frame-in-hook), (frame-out-hook) and
(window-configuration-change-hook). And in this handlers the
(frame-selected-window) still points to the previously selected window,
therefore if you wait some time and call (frame-selected-window) once
again you will get the correct value.

So the question is: is it a bug or such behavior is normal? And if it
normal, how can I find out what frame is selected in (frame-in-hook)?

-- 
best regards,
Skorzhinskiy Mikhail



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-20 11:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-20 11:17 [24.5.1] Inquiry request about emacs focus hooks Skorzhinskiy Mikhail

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).