mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-15 09:05:58 +01:00
parent
8e51a36c7f
commit
abfd550ee2
1 changed files with 7 additions and 0 deletions
|
@ -150,10 +150,17 @@ void CXWM::handleUnmapNotify(xcb_unmap_notify_event_t* e) {
|
|||
}
|
||||
|
||||
static bool lookupParentExists(SP<CXWaylandSurface> XSURF, SP<CXWaylandSurface> prospectiveChild) {
|
||||
std::vector<SP<CXWaylandSurface>> visited;
|
||||
|
||||
while (XSURF->parent) {
|
||||
if (XSURF->parent == prospectiveChild)
|
||||
return true;
|
||||
visited.emplace_back(XSURF);
|
||||
|
||||
XSURF = XSURF->parent.lock();
|
||||
|
||||
if (std::find(visited.begin(), visited.end(), XSURF) != visited.end())
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue