From 06d826d0cac4f82e9bf6ce2c1e38ddbc882a5220 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Wed, 9 Mar 2022 16:28:33 +0800 Subject: [PATCH] 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. --- src/nsfns.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.2