From d2910a0eeb38cb10e24c6d8fea0fbfdd578c42c8 Mon Sep 17 00:00:00 2001 From: 1024jp <1024jp@wolfrosch.com> Date: Tue, 2 Jul 2024 19:51:46 +0900 Subject: [PATCH] Fix repopen event with documents in the Dock --- CHANGELOG.md | 1 + CotEditor/Sources/AppDelegate.swift | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48cf66b6b..4905a16f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ ### Fixes +- Fix an issue that a document kept in the Dock was not brought to the front on the reopen event even though no documents were displayed. - Fix the view layout in the Quick Action bar. - Fix a potential memory leak. diff --git a/CotEditor/Sources/AppDelegate.swift b/CotEditor/Sources/AppDelegate.swift index b50b1e698..2800f56fa 100644 --- a/CotEditor/Sources/AppDelegate.swift +++ b/CotEditor/Sources/AppDelegate.swift @@ -259,9 +259,11 @@ private enum BundleIdentifier { // execute the action directly by self (2024-05, macOS 14). if !flag { (DocumentController.shared as? DocumentController)?.performOnLaunchAction(isReopen: true) + return false + } else { + // -> bring a document in the Dock to the front if any exists. + return true } - - return false }