mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 07:05:58 +01:00
xwayland: break cyclic loop of parents (#6722)
in X11 some surfaces is a parent of itself and creates a cyclic loop when trying to find its parent. check for old parent and break if its beginning to roll over.
This commit is contained in:
parent
4d6f96f74f
commit
d7ea1b7785
1 changed files with 4 additions and 2 deletions
|
@ -445,8 +445,10 @@ PHLWINDOW CWindow::X11TransientFor() {
|
|||
return nullptr;
|
||||
|
||||
auto s = m_pXWaylandSurface->parent;
|
||||
auto oldParent = s;
|
||||
while (s) {
|
||||
if (!s->parent)
|
||||
// break cyclic loop of m_pXWaylandSurface being parent of itself, #TODO reject this from even being created?
|
||||
if (!s->parent || s->parent == oldParent)
|
||||
break;
|
||||
s = s->parent;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue