emacs-devel
[Top][All Lists]
Advanced

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

Re: Question about minibuffer and child frames (Posframe)


From: martin rudalics
Subject: Re: Question about minibuffer and child frames (Posframe)
Date: Wed, 2 Oct 2024 19:34:31 +0200
User-agent: Mozilla Thunderbird

>> The modeline of the "Completions* window seems to have the same
>> background as the modeline of the normal frame's *scratch* window.
>> Doesn't that hint at redisplay believing that both windows are the
>> selected one?
>
> Probably. They are the (frame-selected-window) of their respective
> frames. I guess that has previously not been possible to see on a tty.
> Cab't check at the moment--I've made me a todo to check if xdisp.c does
> this differently on ttys.

At any time there's only one selected window.  When it changes,
redisplay is told to update all possibly involved frames and update the
background of the mode line of the selected and previously selected
windows appropriately.

> Got an idea while eating: Does Emacs get a window system focus event
> when we unhide a frame? Or something like it? And do we select the frame
> then maybe?

When that frame gets focus by the WM; it depends on the WM's settings.
A frame can get focused by making it, moving the mouse over it,
clicking with the mouse into it, Alt-tabbing to it, or by having an
application ask to give it focus.  I suppose that Emacs has the
invariant that the focused frame is also the selected one even if it is
hidden.  In either case, for a tty we have to do the "focusing"
ourselves.

martin



reply via email to

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