GODT-2010: add Cocoa app delegate handler for second application instance.

This commit is contained in:
Xavier Michelon
2023-01-05 17:06:21 +01:00
parent 8790d3cfcf
commit 16aaa1b050
8 changed files with 110 additions and 5 deletions

View File

@ -30,9 +30,16 @@
#include <project_sentry_config.h>
using namespace bridgepp;
#ifdef Q_OS_MACOS
#include "MacOS/SecondInstance.h"
#endif
using namespace bridgepp;
namespace {
/// \brief The file extension for the bridge executable file.
@ -320,6 +327,7 @@ int main(int argc, char *argv[]) {
CommandLineOptions const cliOptions = parseCommandLine(argc, argv);
#ifdef Q_OS_MACOS
registerSecondInstanceHandler();
setDockIconVisibleState(!cliOptions.noWindow);
#endif