mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 02:25:58 +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,6 +178,9 @@ void Events::listener_unmapSubsurface(void* owner, void* data) {
|
|||
if (subsurface->pChild) {
|
||||
const auto PNODE = subsurface->pChild;
|
||||
|
||||
const auto IT = std::find_if(SubsurfaceTree::surfaceTreeNodes.begin(), SubsurfaceTree::surfaceTreeNodes.end(), [&](const SSurfaceTreeNode& other) { return &other == PNODE; });
|
||||
|
||||
if (IT != SubsurfaceTree::surfaceTreeNodes.end()) {
|
||||
int lx = 0, ly = 0;
|
||||
addSurfaceGlobalOffset(PNODE, &lx, &ly);
|
||||
|
||||
|
@ -193,6 +196,7 @@ void Events::listener_unmapSubsurface(void* owner, void* data) {
|
|||
// subsurface->pChild = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Events::listener_commitSubsurface(void* owner, void* data) {
|
||||
SSurfaceTreeNode* pNode = (SSurfaceTreeNode*)owner;
|
||||
|
|
Loading…
Reference in a new issue