mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-02 13:11:55 -07:00
fixed ASSERT and last commit's oopsie
This commit is contained in:
@@ -56,6 +56,16 @@ SSurfaceTreeNode* SubsurfaceTree::createTreeRoot(wlr_surface* pSurface, applyGlo
|
||||
void destroySubsurface(SSubsurface* pSubsurface);
|
||||
|
||||
void SubsurfaceTree::destroySurfaceTree(SSurfaceTreeNode* pNode) {
|
||||
bool exists = false;
|
||||
for (auto& n : surfaceTreeNodes) {
|
||||
if (&n == pNode) {
|
||||
exists = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
RASSERT(exists, "Tried to delete a surfaceTreeNode that doesn't exist!");
|
||||
|
||||
for (auto& c : pNode->childSubsurfaces)
|
||||
destroySubsurface(&c);
|
||||
|
||||
@@ -160,4 +170,4 @@ void Events::listener_destroySubsurfaceNode(wl_listener* listener, void* data) {
|
||||
wl_list_remove(&pNode->listen_destroy.link);
|
||||
|
||||
SubsurfaceTree::surfaceTreeNodes.remove(*pNode);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user