unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* window-normal-size
@ 2012-07-15  5:44 Dmitry Antipov
  2012-07-15 13:00 ` window-normal-size martin rudalics
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Antipov @ 2012-07-15  5:44 UTC (permalink / raw)
  To: Emacs development discussions

If frame has the minibuffer window, should

(window-normal-size)

be always equal to

(/ (float (window-total-height)) (float (- (frame-height) (window-total-height (minibuffer-window)))))?

If not, why these values are slightly different?

Dmitry



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: window-normal-size
  2012-07-15  5:44 window-normal-size Dmitry Antipov
@ 2012-07-15 13:00 ` martin rudalics
  0 siblings, 0 replies; 2+ messages in thread
From: martin rudalics @ 2012-07-15 13:00 UTC (permalink / raw)
  To: Dmitry Antipov; +Cc: Emacs development discussions

 > 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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-15 13:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-15  5:44 window-normal-size Dmitry Antipov
2012-07-15 13:00 ` window-normal-size martin rudalics

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).