core: add an ANR dialog

for xdg-shell, we can ping the wm_base, and thus render an ANR dialog if an app dies

for XWayland, there probably is a similar method, but I don't know about it and don't care.
This commit is contained in:
Vaxry
2025-02-18 15:10:40 +00:00
parent 3352317ca8
commit fb8eaba83f
11 changed files with 272 additions and 6 deletions

View File

@@ -13,6 +13,7 @@
#include "managers/SeatManager.hpp"
#include "managers/VersionKeeperManager.hpp"
#include "managers/DonationNagManager.hpp"
#include "managers/ANRManager.hpp"
#include "managers/eventLoop/EventLoopManager.hpp"
#include <algorithm>
#include <aquamarine/output/Output.hpp>
@@ -592,6 +593,7 @@ void CCompositor::cleanup() {
g_pEventLoopManager.reset();
g_pVersionKeeperMgr.reset();
g_pDonationNagManager.reset();
g_pANRManager.reset();
g_pConfigWatcher.reset();
if (m_pAqBackend)
@@ -694,6 +696,9 @@ void CCompositor::initManagers(eManagersInitStage stage) {
Debug::log(LOG, "Creating the DonationNag!");
g_pDonationNagManager = makeUnique<CDonationNagManager>();
Debug::log(LOG, "Creating the ANRManager!");
g_pANRManager = makeUnique<CANRManager>();
Debug::log(LOG, "Starting XWayland");
g_pXWayland = makeUnique<CXWayland>(g_pCompositor->m_bWantsXwayland);
} break;