core: Properly shutdown wl display (#7018)

* correctly destroy wayland globals

* properly shutdown and cleanup hyprland

* appease the nitpick gods and some comments
This commit is contained in:
Ikalco
2024-07-24 12:07:36 -05:00
committed by GitHub
parent 735e3c6c56
commit 3e543d2ce8
17 changed files with 161 additions and 60 deletions

View File

@@ -19,8 +19,14 @@ CEventLoopManager::CEventLoopManager(wl_display* display, wl_event_loop* wlEvent
}
CEventLoopManager::~CEventLoopManager() {
for (auto& eventSource : m_sWayland.aqEventSources) {
wl_event_source_remove(eventSource);
}
if (m_sWayland.eventSource)
wl_event_source_remove(m_sWayland.eventSource);
if (m_sIdle.eventSource)
wl_event_source_remove(m_sIdle.eventSource);
}
static int timerWrite(int fd, uint32_t mask, void* data) {