unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: martin rudalics <rudalics@gmx.at>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: Window change functions
Date: Sun, 06 Jan 2019 12:22:56 -0500	[thread overview]
Message-ID: <jwvr2dp4smv.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <5C308474.7030106@gmx.at> (martin rudalics's message of "Sat, 05 Jan 2019 11:18:28 +0100")

>> For example, I have a window-size-change-functions which I use to
>> re-balance windows (using balance-window-area) after a frame resize.
> Have you ever tried without that?

Yes, of course.

> Resizing a frame should resize windows proportionally which, if
> windows were balanced before the resizing, should leave them
> balanced afterwards.

Yes, it works OK most of the time, but repeated resizing seems to
accumulate errors (it's better now with pixelwise window sizing, tho),
and it doesn't correctly handle more complex setups where some windows
have a fixed size and where I want relative area to be preserved for
windows of different aspect ratios (where horizontal resizing of the
frame may require vertical resizing of some windows, for example).

>> It doesn't care about the exact window sizes when it's called, so having
>> correct window sizes when it's called is not necessary.  OTOH redisplay
>> will need to happen right after it was run, because it changes
>> window sizes.  So the best time to run it is right before redisplay.
> Not really.  The run_window_change_functions calls in redisplay come
> right after do_pending_window_change calls.  So the former should in
> the fastest possible way pick up any changes caused by the latter.

Hmm... so frame resizing only triggers late... that's a good point.

So I guess the remaining cases are hypothetical ones (e.g. if you
want to put the window dimension in the mode-line).  I haven't tried
those to see if they'd be handled correctly.


        Stefan



  reply	other threads:[~2019-01-06 17:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-25  9:41 Window change functions martin rudalics
2018-12-25 20:13 ` Gnus crash (was: Window change functions) Juri Linkov
2018-12-25 20:39   ` Gnus crash Stefan Monnier
2018-12-26  9:19     ` Paul Eggert
2018-12-26 22:22       ` Juri Linkov
2018-12-26 19:55 ` Window change functions Stefan Monnier
2018-12-27  9:36   ` martin rudalics
2018-12-27 15:56     ` Eli Zaretskii
2019-01-05  6:17       ` Stefan Monnier
2019-01-05  7:20         ` Eli Zaretskii
2019-01-05 10:18         ` martin rudalics
2019-01-06 17:22           ` Stefan Monnier [this message]
2019-01-07  9:03             ` martin rudalics
2019-01-08 18:10               ` Stefan Monnier
2019-01-09 10:02                 ` martin rudalics
2019-01-11  9:23                   ` martin rudalics
2019-01-05  6:13     ` Stefan Monnier
2019-01-05 10:18       ` martin rudalics

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvr2dp4smv.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=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 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).