Subject: bug#14604: 24.3.50.1; Possibly incorrect behaviour of frame-selected-window

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 13 Feb 2022 10:21:38 +0100

E Sabof <[email-masked]> writes:

> This works on 24.3, but on trunk all windows will be shown as "selected".
>
> (setq-default 
>  mode-line-format
>  '(:eval (if (eq (frame-selected-window)
>                  (selected-window))
>              "selected"
>              "not-selected")))
>
> I don't know which behavior is correct, but being able to find which is the "really"
> selected window would be nice.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

In Emacs 29, we've introduced a new function
`mode-line-window-selected-p' for this use case (i.e., determining if
we're rendering the mode line for the currently selected window).  So
I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no