bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Stefan Monnier
Subject: bug#14604: 24.3.50.1; Possibly incorrect behaviour of frame-selected-window
Date: Thu, 13 Jun 2013 10:35:18 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

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

Indeed this doesn't work any more.  This was one of the very few places
where (eq (frame-selected-window) (selected-window)) was nil, and this
"invariant" is presumed at various places in the C code, so it was
a bug.

BTW, this worked in Emacs<24.3 if you wanted to highlight every frame's
selected-window, but not if you wanted to highlight "the one and only
selected-window".  For single-frame settings, there's no difference,
of course.

There is no alternative, yet.  We should probably provide some ad-hoc
primitives (call them maybe display-selected-window and
display-frame-selected-window) which return something like "the window
that was selected when we entered redisplay".


        Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]