mirror of
https://github.com/hyprwm/Hyprland.git
synced 2024-09-11 13:25:42 +03:00
parent
23cd4c7998
commit
9518cec833
@ -301,7 +301,9 @@ CPopup* CPopup::at(const Vector2D& globalCoords, bool allowsInput) {
|
|||||||
return p;
|
return p;
|
||||||
} else {
|
} else {
|
||||||
const Vector2D offset = p->m_pResource ? (p->size() - p->m_pResource->geometry.size()) / 2.F : Vector2D{};
|
const Vector2D offset = p->m_pResource ? (p->size() - p->m_pResource->geometry.size()) / 2.F : Vector2D{};
|
||||||
const auto REGION = CRegion{&p->m_sWLSurface.wlr()->current.input}.translate(p->coordsGlobal() + offset);
|
const auto REGION = CRegion{&p->m_sWLSurface.wlr()->current.input}
|
||||||
|
.intersect(CBox{{}, {p->m_sWLSurface.wlr()->current.width, p->m_sWLSurface.wlr()->current.height}})
|
||||||
|
.translate(p->coordsGlobal() + offset);
|
||||||
if (REGION.containsPoint(globalCoords))
|
if (REGION.containsPoint(globalCoords))
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user