From e8008879d2cacb4e806a4c2e9492167f0532ba57 Mon Sep 17 00:00:00 2001 From: Eric Branlund Date: Fri, 6 Mar 2020 15:14:31 -0800 Subject: [PATCH 1/1] Adopted change from Angband: don't change the window visibility because a window is closed when the application exits. That fixes an issue in Angband, but Hengband currently doesn't seem to be affected. --- src/main-cocoa.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main-cocoa.m b/src/main-cocoa.m index 620fe3d21..73b9aff66 100644 --- a/src/main-cocoa.m +++ b/src/main-cocoa.m @@ -2300,7 +2300,13 @@ static __strong NSFont* gDefaultFont = nil; - (void)windowWillClose: (NSNotification *)notification { + /* + * If closing only because the application is terminating, don't update + * the visible state for when the application is relaunched. + */ + if (! quit_when_ready) { [self saveWindowVisibleToDefaults: NO]; + } } @end @@ -4780,6 +4786,7 @@ static void play_sound(int event) { if (p_ptr->playing == FALSE || game_is_finished == TRUE) { + quit_when_ready = true; return NSTerminateNow; } else if (! inkey_flag) -- 2.11.0