mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-07 13:25:58 +01:00
fix subsurfaces not damaging on unmap
This commit is contained in:
parent
2cd2f8b5b5
commit
84a0fa0f34
1 changed files with 16 additions and 0 deletions
|
@ -89,6 +89,20 @@ void SubsurfaceTree::destroySurfaceTree(SSurfaceTreeNode* pNode) {
|
|||
pNode->hyprListener_destroy.removeCallback();
|
||||
pNode->hyprListener_newSubsurface.removeCallback();
|
||||
|
||||
// damage
|
||||
if (pNode->pSurface) {
|
||||
wlr_box extents = {};
|
||||
wlr_surface_get_extends(pNode->pSurface, &extents);
|
||||
|
||||
int lx = 0, ly = 0;
|
||||
addSurfaceGlobalOffset(pNode, &lx, &ly);
|
||||
|
||||
extents.x += lx;
|
||||
extents.y += ly;
|
||||
|
||||
g_pHyprRenderer->damageBox(&extents);
|
||||
}
|
||||
|
||||
surfaceTreeNodes.remove(*pNode);
|
||||
|
||||
Debug::log(LOG, "SurfaceTree Node removed");
|
||||
|
@ -162,6 +176,8 @@ void Events::listener_unmapSubsurface(void* owner, void* data) {
|
|||
extents.x += lx;
|
||||
extents.y += ly;
|
||||
|
||||
g_pHyprRenderer->damageBox(&extents);
|
||||
|
||||
SubsurfaceTree::destroySurfaceTree(subsurface->pChild);
|
||||
subsurface->pChild = nullptr;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue