Added shutdownOnClose Insight config param, to trigger a shutdown when the user closes the main Insight window.

This commit is contained in:
Nav
2023-07-14 18:39:27 +01:00
parent edcf62e67d
commit bc4939e48f
9 changed files with 56 additions and 1 deletions

View File

@@ -170,6 +170,10 @@ namespace Bloom
applicationEventListener->registerCallbackForEventType<Events::InsightActivationRequested>(
std::bind(&Application::onInsightActivationRequest, this, std::placeholders::_1)
);
applicationEventListener->registerCallbackForEventType<Events::InsightMainWindowClosed>(
std::bind(&Application::onInsightMainWindowClosed, this, std::placeholders::_1)
);
#endif
this->startTargetController();
this->startDebugServer();
@@ -586,6 +590,12 @@ namespace Bloom
this->activateInsight();
}
void Application::onInsightMainWindowClosed(const Events::InsightMainWindowClosed& event) {
if (this->insightConfig->shutdownOnClose) {
this->triggerShutdown();
}
}
#endif
void Application::onShutdownApplicationRequest(const Events::ShutdownApplication&) {