aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-05-10 02:36:56 +0100
committerVaxry <[email protected]>2024-05-10 02:38:56 +0100
commit2ba6bb69c4b455ff6327596a63bf1785d0910d2c (patch)
treea773be09861551072bad9f58f08cc0fdca39b95d
parentdb30ff63e6dc3d3b631f9da55ccadc07c4440948 (diff)
downloadHyprland-2ba6bb69c4b455ff6327596a63bf1785d0910d2c.tar.gz
Hyprland-2ba6bb69c4b455ff6327596a63bf1785d0910d2c.zip
popups: fix breadthfirst and at
fixes #5977
-rw-r--r--src/desktop/Popup.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/desktop/Popup.cpp b/src/desktop/Popup.cpp
index 05e79b4e..e172744d 100644
--- a/src/desktop/Popup.cpp
+++ b/src/desktop/Popup.cpp
@@ -301,6 +301,7 @@ void CPopup::bfHelper(std::vector<CPopup*> nodes, std::function<void(CPopup*, vo
void CPopup::breadthfirst(std::function<void(CPopup*, void*)> fn, void* data) {
std::vector<CPopup*> popups;
popups.push_back(this);
+ bfHelper(popups, fn, data);
}
CPopup* CPopup::at(const Vector2D& globalCoords, bool allowsInput) {
@@ -316,7 +317,7 @@ CPopup* CPopup::at(const Vector2D& globalCoords, bool allowsInput) {
if (BOX.containsPoint(globalCoords))
return p;
} else {
- const auto REGION = CRegion{&m_sWLSurface.wlr()->current.input}.translate(p->coordsGlobal());
+ const auto REGION = CRegion{&p->m_sWLSurface.wlr()->current.input}.translate(p->coordsGlobal());
if (REGION.containsPoint(globalCoords))
return p;
}