xwayland: fix incorrect VECINRECT usage

Fixes #3002. VECINRECT uses x2 and y2 and not w / h.
This commit is contained in:
Vaxry 2023-08-18 22:20:05 +02:00
parent 3d9545d2e0
commit 14f20a7372

View file

@ -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;
}