[Top][All Lists]

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

Re: moving window handling into lisp

From: David Kastrup
Subject: Re: moving window handling into lisp
Date: Sun, 16 Aug 2009 18:15:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

martin rudalics <address@hidden> writes:

>> What _is_ the "old structure" when resizing opaquely?  It might be
>> easiest to store window sizes as fractions.  When resizing a frame, the
>> fractions don't change (so the internal window configuration snaps to
>> the closest integral value).  When resizing individual windows, the
>> fractions are made whole again, matching the character positions of the
>> frame.
> I'm not sure how to understand the last sentence.  Why and how are
> "fractions made whole again"?

A fraction for a window border position remains a fraction (of the frame
size) if it is an inherent result of resizing the frame.  If the user
adjusts individual window borders, however, their new position is an
integer since it is not an implicit result of frame resizing.

In a nutshell: whatever position is manipulated _directly_ is made an
integer at the time of the manipulation.  Window borders that are only
repositioned as an implicit (proportionate) result of some resizing
operation, do the bookkeeping of their position as a fraction that
corresponds to the resized ratios.

>> Note that storing stuff in that manner also allows repeated toggles of
>> tool-bar-mode and similar to revert to the original frame configuration
>> painlessly since the outer window edges (which can't be repositioned
>> within a frame) retain the original fractions indefinitely as long as
>> the frame itself is not resized manually.
> I suppose the outer window edges also change fractions when the window
> is resized manually.  Or what am I missing?

Resizing manually manipulates the outer window edges directly.  So they
are candidates for integral representations as a result of the

David Kastrup

reply via email to

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