On Sun, May 02, 2021 at 09:19:20PM +0200, martin rudalics wrote: > > Perhaps it just needs to look like this? > > > > if ((oldh == newh && oldw == neww) > > || (newh == emacsframe->new_height > > && neww == emacsframe->new_width)) > > > > This is hard, because I can't replicate either of the reported bugs > > and I suspect my reasoning is very off here. > > I think I understand now: When Emacs is busy it cannot set oldh and oldw > immediately so oldh == newh && oldw == neww will continue to fail and we > cannot return. How about something like the below? I think the attached works. I finally managed to reproduce the bug and realised that the offscreen buffer's size doesn't really have anything to do with what Emacs thinks the frame size is, so I've separated its resizing code out. Your suggested code for dealing with the Emacs frame size appears to work right without any crashes on GNUstep too, so I've included it. Now I just need to work out why using the menus causes GNUstep builds to crash and we might have a semi-usable port again. ;) -- Alan Third