Indrajeet I think I have fixed this here. Basically, the bug totally breaks the behavior with -nw but only partially breaks the gui behavior. In the latter case, parts of the window structure are corrupted but apparently these do not substantially inhibit working with Emacs here. It's not excluded though, that the NS port fails in the gui case as well. I attach two fixes for this: - window.c.diff is the one I intend to install on Emacs 28 soon. - window-27.diff is one you can install for Emacs 27 provided you are able to build Emacs on your system. It includes the window.el patch which is already on Emacs 28. If you can't build Emacs yourself, I'm afraid you have to wait for the new release. Good luck and many thanks for the forensics, martin