emacs-devel
[Top][All Lists]
Advanced

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

Re: window-normal-size


From: martin rudalics
Subject: Re: window-normal-size
Date: Sun, 15 Jul 2012 15:00:19 +0200

> If frame has the minibuffer window,

I suppose you mean a "normal" frame with a live root window and a
minibuffer window.

> should
>
> (window-normal-size)
>
> be always equal to
>
> (/ (float (window-total-height)) (float (- (frame-height)
> (window-total-height (minibuffer-window)))))?

I can't tell because I don't know what `frame-height' is supposed to
return.

> If not, why these values are slightly different?

The normalized size of a window is independent from the size of its
frame.  Conceptually, the sum of the normal sizes of the child windows
of any window is 1.0.  A frame root window doesn't have a parent window,
it's normalized size is by definition 1.0.

For any other window, its normalized size is roughly spoken the fraction
corresponding to the size the window should have wrt to its parent
window if the frame were sufficiently large so that all its windows
would have their ideal size (that is, the size the user asked for when
the window was created or explicitly resized).  Note that the normalized
size does _not_ change when the window's parent or its frame is resized.

martin



reply via email to

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