Subject: Re: bug#13225: 24.3.50; Non-selected window has not mode-line-inactive face

From: martin rudalics <[email-masked]>
Date: Sat, 22 Dec 2012 18:42:04 +0100

> I believe we always do, especially when (potentially) running Elisp
 > code, which can in turn run pretty much any code.

Who am I to object?  I thought the purpose of this was that a user can,
in her mode line code, call `frame-selected-window' to check whether the
currently selected window really is the selected window (at least in a
one-frame environment).  If we synchronize the frame's selected window
too, there's no way to get that any more.  Not that such a kludgy
behavior seems reasonable ...

 > Oh, that's what you mean.  Yes, maybe we could/should just use
 > select_window(_norecord) (which is not just the way
 > run_window_configuration_change_hook does it,

If the function on the hook is local to the window's buffer, it does
precisely that.  Which is not entirely kosher because that function will
have no idea about the really selected window but we always have the
global hook for that.

 > but is more generally the
 > normal way to do it).  My recent change already brings display_mode_lines
 > closer to what select_window does.

IIUC display_mode_lines contains the only Lisp running code where the
selected window does not necessarily equal the selected window of its
frame.  So it might be worth to fix this.

martin