bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#21333: 25.0.50; window-size-change-functions not called after mini-w


From: Pip Cet
Subject: bug#21333: 25.0.50; window-size-change-functions not called after mini-window resize
Date: Wed, 26 Aug 2015 10:07:28 +0000

On Wed, Aug 26, 2015 at 7:09 AM, martin rudalics <rudalics@gmx.at> wrote:
>> So an alternative that doesn't need any hook is
>> simply to recompute the coordinates every time they are needed.  It's
>> not like this calculation is expensive, is it?
>
> Correct.

I disagree, if I understand correctly. The coordinates might be passed
to another program, for example, and then we simply don't know when
that program decides to use them, so we still need a way to update our
(and its) idea of what the window size and position is, in my opinion.

> So ‘window-size-change-functions’ is dispensable.

Iff we keep/fix pre-redisplay-function, I agree. I had, wrongly,
assumed that pre-redisplay-function is run many times per redisplay
call, but that appears to be incorrect. The huge majority of
redisplays call it just once, and that makes the overhead negligible.

So what's the way forward, assuming my paperwork ever gets here?
 - document window-size-change-functions aren't called for mini-window resizes
 - document window-configuration-change-hook isn't called for
mini-window resizes
 - document set-window-configuration doesn't call
window-size-change-functions if nothing changed
 - fix set_window_configuration not to set the window size change flag
unless there was an actual size change
 - wishlist item: call pre-redisplay-function between
grow/shrink_mini_window and the actual X repaint, rather than before.
 - mark window-size-change-functions as obsolete and see whether
anyone complains?

> OTOH for the person who
> writes the function on the hook it might hardly matter whether some
> window size really changed.  The more important case might be to not
> miss one single case where the size really changes.

Precisely.

Attachment: 0001-Document-and-fix-behavior-of-window-pre-redisplay-ho.patch
Description: Text Data


reply via email to

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