diff options
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index d40f3ce8..87748109 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -73,7 +73,7 @@ #include "render/AsyncResourceGatherer.hpp" #include "plugins/PluginSystem.hpp" #include "hyprerror/HyprError.hpp" -#include "debug/HyprNotificationOverlay.hpp" +#include "notification/NotificationOverlay.hpp" #include "debug/HyprDebugOverlay.hpp" #include "helpers/MonitorFrameScheduler.hpp" #include "i18n/Engine.hpp" @@ -590,7 +590,7 @@ void CCompositor::cleanup() { g_pDecorationPositioner.reset(); g_pCursorManager.reset(); g_pPluginSystem.reset(); - g_pHyprNotificationOverlay.reset(); + Notification::overlay().reset(); g_pDebugOverlay.reset(); g_pEventManager.reset(); g_pSessionLockManager.reset(); @@ -697,8 +697,8 @@ void CCompositor::initManagers(eManagersInitStage stage) { Log::logger->log(Log::DEBUG, "Creating the HyprDebugOverlay!"); g_pDebugOverlay = makeUnique<CHyprDebugOverlay>(); - Log::logger->log(Log::DEBUG, "Creating the HyprNotificationOverlay!"); - g_pHyprNotificationOverlay = makeUnique<CHyprNotificationOverlay>(); + Log::logger->log(Log::DEBUG, "Creating the NotificationOverlay!"); + Notification::overlay(); Log::logger->log(Log::DEBUG, "Creating the PluginSystem!"); g_pPluginSystem = makeUnique<CPluginSystem>(); @@ -2573,7 +2573,7 @@ void CCompositor::performUserChecks() { if (!*PNOCHECKXDG) { const auto CURRENT_DESKTOP_ENV = getenv("XDG_CURRENT_DESKTOP"); if (!CURRENT_DESKTOP_ENV || std::string{CURRENT_DESKTOP_ENV} != "Hyprland") { - g_pHyprNotificationOverlay->addNotification( + Notification::overlay()->addNotification( I18n::i18nEngine()->localize(I18n::TXT_KEY_NOTIF_EXTERNAL_XDG_DESKTOP, {{"value", CURRENT_DESKTOP_ENV ? CURRENT_DESKTOP_ENV : "unset"}}), CHyprColor{}, 15000, ICON_WARNING); } @@ -2581,16 +2581,16 @@ void CCompositor::performUserChecks() { if (!*PNOCHECKGUIUTILS) { if (!NFsUtils::executableExistsInPath("hyprland-dialog")) - g_pHyprNotificationOverlay->addNotification(I18n::i18nEngine()->localize(I18n::TXT_KEY_NOTIF_NO_GUIUTILS), CHyprColor{}, 15000, ICON_WARNING); + Notification::overlay()->addNotification(I18n::i18nEngine()->localize(I18n::TXT_KEY_NOTIF_NO_GUIUTILS), CHyprColor{}, 15000, ICON_WARNING); } if (g_pHyprRenderer->m_failedAssetsNo > 0) { - g_pHyprNotificationOverlay->addNotification(I18n::i18nEngine()->localize(I18n::TXT_KEY_NOTIF_FAILED_ASSETS, {{"count", std::to_string(g_pHyprRenderer->m_failedAssetsNo)}}), - CHyprColor{1.0, 0.1, 0.1, 1.0}, 15000, ICON_ERROR); + Notification::overlay()->addNotification(I18n::i18nEngine()->localize(I18n::TXT_KEY_NOTIF_FAILED_ASSETS, {{"count", std::to_string(g_pHyprRenderer->m_failedAssetsNo)}}), + CHyprColor{1.0, 0.1, 0.1, 1.0}, 15000, ICON_ERROR); } if (!m_watchdogWriteFd.isValid() && !*PNOWATCHDOG) - g_pHyprNotificationOverlay->addNotification(I18n::i18nEngine()->localize(I18n::TXT_KEY_NOTIF_NO_WATCHDOG), CHyprColor{1.0, 0.1, 0.1, 1.0}, 15000, ICON_WARNING); + Notification::overlay()->addNotification(I18n::i18nEngine()->localize(I18n::TXT_KEY_NOTIF_NO_WATCHDOG), CHyprColor{1.0, 0.1, 0.1, 1.0}, 15000, ICON_WARNING); if (m_safeMode) openSafeModeBox(); @@ -2730,8 +2730,8 @@ void CCompositor::checkMonitorOverlaps() { for (const auto& m : m_monitors) { if (!monitorRegion.copy().intersect(m->logicalBox()).empty()) { Log::logger->log(Log::ERR, "Monitor {}: detected overlap with layout", m->m_name); - g_pHyprNotificationOverlay->addNotification(I18n::i18nEngine()->localize(I18n::TXT_KEY_NOTIF_INVALID_MONITOR_LAYOUT, {{"name", m->m_name}}), CHyprColor{}, 15000, - ICON_WARNING); + Notification::overlay()->addNotification(I18n::i18nEngine()->localize(I18n::TXT_KEY_NOTIF_INVALID_MONITOR_LAYOUT, {{"name", m->m_name}}), CHyprColor{}, 15000, + ICON_WARNING); break; } |
