diff options
Diffstat (limited to 'src/debug')
| -rw-r--r-- | src/debug/HyprNotificationOverlay.cpp | 7 | ||||
| -rw-r--r-- | src/debug/HyprNotificationOverlay.hpp | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/debug/HyprNotificationOverlay.cpp b/src/debug/HyprNotificationOverlay.cpp index 2f00d978..80c80601 100644 --- a/src/debug/HyprNotificationOverlay.cpp +++ b/src/debug/HyprNotificationOverlay.cpp @@ -36,6 +36,13 @@ CHyprNotificationOverlay::CHyprNotificationOverlay() { m_szIconFontName = fonts.substr(COLON + 2, LASTCHAR - (COLON + 2)); } +CHyprNotificationOverlay::~CHyprNotificationOverlay() { + if (m_pCairo) + cairo_destroy(m_pCairo); + if (m_pCairoSurface) + cairo_surface_destroy(m_pCairoSurface); +} + void CHyprNotificationOverlay::addNotification(const std::string& text, const CColor& color, const float timeMs, const eIcons icon, const float fontSize) { const auto PNOTIF = m_dNotifications.emplace_back(std::make_unique<SNotification>()).get(); diff --git a/src/debug/HyprNotificationOverlay.hpp b/src/debug/HyprNotificationOverlay.hpp index 25934734..d086ada9 100644 --- a/src/debug/HyprNotificationOverlay.hpp +++ b/src/debug/HyprNotificationOverlay.hpp @@ -39,6 +39,7 @@ struct SNotification { class CHyprNotificationOverlay { public: CHyprNotificationOverlay(); + ~CHyprNotificationOverlay(); void draw(CMonitor* pMonitor); void addNotification(const std::string& text, const CColor& color, const float timeMs, const eIcons icon = ICON_NONE, const float fontSize = 13.f); |
