From: Eli Zaretskii <eliz@gnu.org>
To: martin rudalics <rudalics@gmx.at>
Cc: emacs-devel@gnu.org
Subject: Re: Window tree and window's internal height
Date: Sun, 18 Nov 2018 22:25:00 +0200 [thread overview]
Message-ID: <834lcet9pf.fsf@gnu.org> (raw)
In-Reply-To: <5BF1C03B.2030801@gmx.at> (message from martin rudalics on Sun, 18 Nov 2018 20:40:43 +0100)
> Date: Sun, 18 Nov 2018 20:40:43 +0100
> From: martin rudalics <rudalics@gmx.at>
> CC: emacs-devel@gnu.org
>
> >> > A minibuffer window (*note Minibuffer Windows::) is not part of its
> >> > frame’s window tree unless the frame is a minibuffer-only frame.
> >> > Nonetheless, most of the functions in this section accept the minibuffer
> >> > window as an argument. Also, the function ‘window-tree’ described at
> >> > the end of this section lists the minibuffer window alongside the actual
> >> > window tree.
> [...]
> > So maybe we should simply say that the mini-window doesn't have a
> > parent, instead of what we say now?
>
> We can do that. But that would not remove or explain the fact that
> the minibuffer is the next sibling of the root window and the root
> window the previous sibling of the minibuffer window. We could add a
> sentence like "For convenience, the function `window-next-sibling',
> when invoked with the root window as argument, returns its frame's
> minibuffer window if the frame has a minibuffer window and is not a
> minibuffer-only frame." unless it's even more confusing.
I thought of saying something like
The minibuffer window does not have a parent window, but it
nevertheless is a sibling of the frame's root window, and thus can
be reached via window-next-sibling.
> > Looking at w->next _was_ what tripped me in the first place: I didn't
> > expect a sole window on a TTY frame to have a non-nil object pointed
> > by its 'next' pointer.
>
> I miss you here. The display code is the major client of this trick
And you therefore assumed that I must remember this factoid by heart?
I don't. I've read the description of the window tree, and thought
"this is a single window on its TTY frame, it cannot possibly have
anything non-nil pointed to by its 'next' pointer". Oops!
> I don't like it much because when I want to display a "permanent"
> minibuffer window at the top of the frame, it must be still the "next"
> sibling of the root window. Worse even - I cannot easily display the
> echo area at the top of the frame and the minibuffer at its bottom in
> two (semi-)permanent windows.
I guess you will need to invent one more "bastard" node in the tree
that doesn't have a parent?
> > window_scroll_line_based is never used on GUI frames,
>
> I wasn't aware of that. I always thought the comment
>
> /* If we must, use the pixel-based version which is much slower than
> the line-based one but can handle varying line heights. */
>
> means that we would allow for some sort of line based scrolling on GUI
> frames.
No. The code is very unequivocal:
/* If we must, use the pixel-based version which is much slower than
the line-based one but can handle varying line heights. */
if (FRAME_WINDOW_P (XFRAME (XWINDOW (window)->frame))) <<<<<<<<<<
window_scroll_pixel_based (window, n, whole, noerror);
else
window_scroll_line_based (window, n, whole, noerror);
> > and dividers and
> > scroll bars always have exactly zero size on TTY frames. Right?
>
> Right.
OK, thanks. I'll make the changes.
next prev parent reply other threads:[~2018-11-18 20:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-17 12:58 Window tree and window's internal height Eli Zaretskii
2018-11-17 18:39 ` martin rudalics
2018-11-18 15:53 ` Eli Zaretskii
2018-11-18 19:40 ` martin rudalics
2018-11-18 20:25 ` Eli Zaretskii [this message]
2018-11-19 9:41 ` martin rudalics
2018-11-19 18:36 ` Eli Zaretskii
2018-11-20 9:28 ` martin rudalics
2018-11-20 16:06 ` Eli Zaretskii
2018-11-20 18:49 ` Eli Zaretskii
2018-11-20 23:50 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=834lcet9pf.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=rudalics@gmx.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.