mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-29 15:05:59 +01:00
better subsurface handling on unmaps
This commit is contained in:
parent
0743dab3f0
commit
881f828250
1 changed files with 14 additions and 10 deletions
|
@ -178,19 +178,23 @@ void Events::listener_unmapSubsurface(void* owner, void* data) {
|
||||||
if (subsurface->pChild) {
|
if (subsurface->pChild) {
|
||||||
const auto PNODE = subsurface->pChild;
|
const auto PNODE = subsurface->pChild;
|
||||||
|
|
||||||
int lx = 0, ly = 0;
|
const auto IT = std::find_if(SubsurfaceTree::surfaceTreeNodes.begin(), SubsurfaceTree::surfaceTreeNodes.end(), [&](const SSurfaceTreeNode& other) { return &other == PNODE; });
|
||||||
addSurfaceGlobalOffset(PNODE, &lx, &ly);
|
|
||||||
|
|
||||||
wlr_box extents = {lx, ly, 0, 0};
|
if (IT != SubsurfaceTree::surfaceTreeNodes.end()) {
|
||||||
if (PNODE->pSurface) {
|
int lx = 0, ly = 0;
|
||||||
extents.width = PNODE->pSurface->current.width;
|
addSurfaceGlobalOffset(PNODE, &lx, &ly);
|
||||||
extents.height = PNODE->pSurface->current.height;
|
|
||||||
|
|
||||||
g_pHyprRenderer->damageBox(&extents);
|
wlr_box extents = {lx, ly, 0, 0};
|
||||||
|
if (PNODE->pSurface) {
|
||||||
|
extents.width = PNODE->pSurface->current.width;
|
||||||
|
extents.height = PNODE->pSurface->current.height;
|
||||||
|
|
||||||
|
g_pHyprRenderer->damageBox(&extents);
|
||||||
|
}
|
||||||
|
|
||||||
|
// SubsurfaceTree::destroySurfaceTree(subsurface->pChild);
|
||||||
|
// subsurface->pChild = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
//SubsurfaceTree::destroySurfaceTree(subsurface->pChild);
|
|
||||||
//subsurface->pChild = nullptr;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue