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

@@ -15,13 +15,20 @@ static void bindManagerInt(wl_client* client, void* data, uint32_t version, uint
}
static void handleDisplayDestroy(struct wl_listener* listener, void* data) {
g_pProtocolManager->m_pToplevelExportProtocolManager->displayDestroy();
CToplevelExportProtocolManager* proto = wl_container_of(listener, proto, m_liDisplayDestroy);
proto->displayDestroy();
}
void CToplevelExportProtocolManager::displayDestroy() {
wl_list_remove(&m_liDisplayDestroy.link);
wl_list_init(&m_liDisplayDestroy.link);
wl_global_destroy(m_pGlobal);
}
CToplevelExportProtocolManager::~CToplevelExportProtocolManager() {
displayDestroy();
}
CToplevelExportProtocolManager::CToplevelExportProtocolManager() {
#ifndef GLES32