mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-22 07:23:49 -07:00
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:
@@ -16,15 +16,22 @@ static void bindManagerInt(wl_client* client, void* data, uint32_t version, uint
|
||||
}
|
||||
|
||||
static void handleDisplayDestroy(struct wl_listener* listener, void* data) {
|
||||
g_pProtocolManager->m_pScreencopyProtocolManager->displayDestroy();
|
||||
CScreencopyProtocolManager* proto = wl_container_of(listener, proto, m_liDisplayDestroy);
|
||||
proto->displayDestroy();
|
||||
}
|
||||
|
||||
void CScreencopyProtocolManager::displayDestroy() {
|
||||
wl_list_remove(&m_liDisplayDestroy.link);
|
||||
wl_list_init(&m_liDisplayDestroy.link);
|
||||
wl_global_destroy(m_pGlobal);
|
||||
}
|
||||
|
||||
static SScreencopyFrame* frameFromResource(wl_resource*);
|
||||
|
||||
CScreencopyProtocolManager::~CScreencopyProtocolManager() {
|
||||
displayDestroy();
|
||||
}
|
||||
|
||||
CScreencopyProtocolManager::CScreencopyProtocolManager() {
|
||||
|
||||
m_pGlobal = wl_global_create(g_pCompositor->m_sWLDisplay, &zwlr_screencopy_manager_v1_interface, SCREENCOPY_VERSION, this, bindManagerInt);
|
||||
|
Reference in New Issue
Block a user