Subject: Re: bug#50141: Current part of emacs red, other parts blue

From: Juri Linkov <[email-masked]>
Date: Sun, 22 Aug 2021 11:34:03 +0300

> However, Dan's request has come up a number of times (e.g., bug#12056,
> which I'm merging this with), so I'm wondering whether we should add
> something like this...  or at least add some infrastructure that would
> allow it.
>
> The obvious thing would be to run something from `select-window', but I
> don't see any obvious hook that we could be using there.  Am I missing
> something?  I was thinking about adding a minor mode for changing
> background colours in windows...
>
> On the other hand, if we want to add this, perhaps it'd make more sense
> to just add a new variable to change the background colour of
> non-selected backgrounds directly.

There was a similar request recently in bug#49844 to highlight
the active non-selected minibuffer only.  The latest patch uses
window-selection-change-functions and adds a window-local overlay
with a special face.

Adding a new variable would be nice to generalize such feature.
When it will contain a face name, then the minibuffer could set
it buffer-locally, so it will affect only the minibuffer for bug#49844.