all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Window tree and window's internal height
Date: Mon, 19 Nov 2018 10:41:03 +0100	[thread overview]
Message-ID: <5BF2852F.7010400@gmx.at> (raw)
In-Reply-To: <834lcet9pf.fsf@gnu.org>

 > 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.

I'd start the sentence with "A minibuffer window that is not alone on
its frame ..." but for the rest it's fine with me.

 >> 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?

Indeed, I did.  Also because most of the Elisp windows code I added
swirls away this factoid by using 'window-right' and 'window-left'.

 > 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!

So sometimes such details are important in the manual.  Still, I
wouldn't rely on the Elisp manual to tell me anything about the
underlying C structures.

Inherently, the root of each window tree is a virtual "inner frame"
window which must have at least one and at most two child windows -
the root window and the minibuffer window.  This is important for
resizing operations which have to guarantee that the heights of the
minibuffer and root window sum up to the height of the inner frame.

Since for the rest that virtual window has no importance - once set
up its child windows can never change - code for it was never written
out explicitly.  So a correct specification of our window tree concept
would have to talk about that inner frame window but then the entire
definitions of root window would have to be rewritten ...

 > I guess you will need to invent one more "bastard" node in the tree
 > that doesn't have a parent?

And make it the next sibling of the other minibuffer window.  It gives
up the idea of an "ordered" tree but since the root has a next sibling
already it's not a rooted tree anyway.

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

The code is unequivocal, the comment leaves much room to
interpretation.

martin



  reply	other threads:[~2018-11-19  9:41 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
2018-11-19  9:41         ` martin rudalics [this message]
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=5BF2852F.7010400@gmx.at \
    --to=rudalics@gmx.at \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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.