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

From: Stefan Monnier <[email-masked]>
Date: Sat, 22 Dec 2012 11:56:28 -0500

>>> ... and while we compute the mode line we don't care whether
>>> selected_frame-> selected_window equals selected_window.
>> What makes you think so?
> So we do?

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

>>> Wouldn't it be more correct to handle this as in
>>> run_window_configuration_change_hook?
>> I don't know how run_window_configuration_change_hook handles "this".

> Hmmm... that's your code so I can only provide my interpretation of it:
> run_window_configuration_change_hook uses select_window_norecord (which
> preserves the selected_frame->selected_window = selected_window property
> we, according to your question above, do care about.  display_mode_lines
> does only XSETWINDOW (selected_window, w) which does not preserve that
> property IIUC.

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, but is more generally the
normal way to do it).  My recent change already brings display_mode_lines
closer to what select_window does.

        Stefan