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 19:56:07 +0200

>> But for that it (1) has to "walk the window tree as well" and (2) know
>> where to draw the minibuffer window.
>
> No, it doesn't.  The window glyph matrices on TTY frames are actually
> portions of the frame glyph matrix, so whenever a window's glyphs are
> updated by xdisp.c, the corresponding glyphs of the frame are
> automagically updated as well.

Looks like changing the minibuffer position is harder for TTY frames.

>>   > There are at least two functions in the display engine that walk the
>>   > window tree,
>>
>> Which ones are that?
>
> redisplay_windows and hscroll_window_tree.  I now see that so do
> mark_window_display_accurate, redisplay_mode_lines,
> update_cursor_in_window_tree, and expose_window_tree.

As a matter of fact, there are a few more in window.c - foreach_window,
mark_window_cursors_off, window_set_before_size_change_sizes,
window_size_changed and get_leaf_windows.  So I suppose that John should
try hard to _not_ change the relative order of the root and minibuffer
window and hope that interchanging the coordinates (something he has to
do anyway) will suffice.

>> The window tree proper is the tree rooted at the root window.  The root
>> window and the minibuffer window of a "normal" frame do not form a tree
>> - they have no common ancestor.
>
> Maybe I'm missing something, but there's this fragment in make_frame:
>
>    root_window = make_window ();
>    rw = XWINDOW (root_window);
>    if (mini_p)
>      {
>        mini_window = make_window ();
>        mw = XWINDOW (mini_window);
>        wset_next (rw, mini_window);
>        wset_prev (mw, root_window);
>        mw->mini = 1;
>        wset_frame (mw, frame);
>        fset_minibuffer_window (f, mini_window);
>        store_frame_param (f, Qminibuffer, Qt);
>      }
>
> This seems to arrange for the minibuffer window to be the "next" of
> the root window, no?

Yes.  The root of the next tree, as it were.  Obviously, this next field
is convenient for walking the structure formed by the root tree and the
minibuffer window as your examples from the display engine show.

martin



reply via email to

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