From: Po Lu Date: Wed, 9 Mar 2022 08:28:33 +0000 (+0800) Subject: Fix error when creating frames on NS with no main window X-Git-Tag: emacs-29.0.90~1943 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=06d826d0cac4f82e9bf6ce2c1e38ddbc882a5220;p=emacs.git Fix error when creating frames on NS with no main window * nsfns.m (Fx_create_frame): If main window is not present, center frame window instead of cascading it. --- diff --git a/src/nsfns.m b/src/nsfns.m index 6256bd220dd..720ed3f88e5 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -1503,7 +1503,7 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame, [frame_window cascadeTopLeftFromPoint: top_left]; } else - [main_window center]; + [frame_window center]; } /* Make sure windows on this frame appear in calls to next-window