emacs-devel
[Top][All Lists]
Advanced

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

Re: Emphasizing the top of the frame


From: martin rudalics
Subject: Re: Emphasizing the top of the frame
Date: Wed, 26 Oct 2016 14:31:18 +0200

>> Does the display engine anywhere rely on that order?
>
> Not that I've seen (by looking at all users of FRAME_MINIBUF_WINDOW),

I thought about some implicit ordering within the TTY display code.
Critical uses would be that of the next field of the root window - not
easy to spot, though (window.c, which has the greatest share of them,
can be disregarded, however).

> but I could miss something.  And there is init_xdisp, which you
> mentioned, that hardcodes the top coordinate of the minibuffer window.

If we only talk about _coordinates_ I see no problem - these have to be
adjusted anway.

> But see below.
>
>> The frame/window code doesn't and conceptually should even tolerate
>> the next window of the root window being nil all the time.
>
> But doesn't the frame's window tree have to start with the root
> window?  If it does, then how do we make the minibuffer window be its
> "prev"?

Both, a frame's root and minibuffer window, are accessible directly.
There is no reliance on the prev and next fields of these windows, with
one exception: The `window-tree' function would have to be modified
accordingly if we decided to swap the root and minibuffer windows'
order.  But that function should not be used anyway.  The more important
function is ‘walk-window-tree’ and that one accesses the minibuffer via
‘minibuffer-window’.

>> Note, however, that enlarging the minibuffer window currently tries to
>> "adjust the trailing edge" of the root window (see that comment in
>> ‘window--resize-root-window-vertically’
>>
>>         ;; When shrinking the root window, emulate an edge drag in order
>>         ;; to not resize other windows if we can avoid it (Bug#12419).
>>
>> and the bug mentioned there for why that is important).
>
> And that is at least one implicit dependency on this in the display
> engine.  I wonder how many more are there.

Where do you see an "implicit dependency" here?

> IME, eventually there's no other way but to make the changes in the
> places you find, fire up Emacs, see what stops working, and debug and
> fix each feature that becomes broken.
>
> We probably should have a variable that tells where the minubuffer
> window appears, and code which needs to know needs to examine its
> value.

An option, yes.  Or a special value `top' for the minibuffer frame
parameter.

martin




reply via email to

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