aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2022-04-25 13:40:46 +0200
committervaxerski <[email protected]>2022-04-25 13:40:46 +0200
commit9eae3b3c3bdef052f93c9d63fe29aca77c2df206 (patch)
tree4b87c319c1439ae61cd1082621f929791a69e35a /src/Compositor.cpp
parent68605c2ccfc74cdc5238e730a97d7a6de9882489 (diff)
downloadHyprland-9eae3b3c3bdef052f93c9d63fe29aca77c2df206.tar.gz
Hyprland-9eae3b3c3bdef052f93c9d63fe29aca77c2df206.zip
minor xwayland constraint fixes
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index 8cdd9889..56e8e8ff 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -769,4 +769,22 @@ bool CCompositor::isPointOnAnyMonitor(const Vector2D& point) {
}
return false;
+}
+
+CWindow* CCompositor::getConstraintWindow(SMouse* pMouse) {
+ if (!pMouse->currentConstraint)
+ return nullptr;
+
+ const auto PSURFACE = pMouse->currentConstraint->surface;
+
+ for (auto& w : m_lWindows) {
+ if (PSURFACE == g_pXWaylandManager->getWindowSurface(&w)) {
+ if (!w.m_bIsX11 && !windowValidMapped(&w))
+ continue;
+
+ return &w;
+ }
+ }
+
+ return nullptr;
} \ No newline at end of file