From 14f20a737221f09a601d846c2b37b969afe2e725 Mon Sep 17 00:00:00 2001 From: vaxerski Date: Fri, 18 Aug 2023 22:20:05 +0200 Subject: [PATCH] xwayland: fix incorrect VECINRECT usage Fixes #3002. VECINRECT uses x2 and y2 and not w / h. --- src/managers/XWaylandManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/managers/XWaylandManager.cpp b/src/managers/XWaylandManager.cpp index 5820f9a3c..76f979da4 100644 --- a/src/managers/XWaylandManager.cpp +++ b/src/managers/XWaylandManager.cpp @@ -317,7 +317,7 @@ Vector2D CHyprXWaylandManager::xwaylandToWaylandCoords(const Vector2D& coord) { CMonitor* pMonitor = nullptr; for (auto& m : g_pCompositor->m_vMonitors) { const auto SIZ = *PXWLFORCESCALEZERO ? m->vecTransformedSize : m->vecSize; - if (VECINRECT(coord, m->vecXWaylandPosition.x, m->vecXWaylandPosition.y, SIZ.x, SIZ.y)) { + if (VECINRECT(coord, m->vecXWaylandPosition.x, m->vecXWaylandPosition.y, m->vecXWaylandPosition.x + SIZ.x, m->vecXWaylandPosition.y + SIZ.y)) { pMonitor = m.get(); break; }