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

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

bug#48162: 28.0.50; Resizing using set-frame-width doesn't expand mode-l


From: martin rudalics
Subject: bug#48162: 28.0.50; Resizing using set-frame-width doesn't expand mode-line
Date: Sun, 2 May 2021 18:57:08 +0200

> This patch reintroduces the infinite loop I was trying to avoid.
>
> viewDidResize is called every time the view's "frame" is touched. Most
> of the time this happens when nothing has changed, but calling
> change_frame_size, even when nothing has changed, appears to cause the
> toolbar to redraw, which causes viewDidResize to be called again, and
> so on ad infinitum.
>
> So I put in the check whether the new frame size that's reported is
> actually the same as the previous frame size, and if so do nothing.
> Then realised that I need to check the new_height and new_width
> settings in case the change is already pending.
>
> I'm not sure where new_size_p comes into it, perhaps we don't even
> need to check it in viewDidResize, because all we care about is the
> final outcome?
>
> Maybe this really isn't the way to do it and I need to keep track of
> the frame size separately, which is something I was hoping to avoid.

new_size_p true means that Emacs has already received a resize event for
this frame but was not yet able to process it.  So the additional

          || (newh == emacsframe->new_height
              && neww == emacsframe->new_width)))

in that case should "do nothing" when "nothing has changed".  Where does
my reasoning go wrong?

martin





reply via email to

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