aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/managers/input/InputManager.cpp
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-03-08 22:51:28 +0000
committerVaxry <[email protected]>2024-03-08 22:51:28 +0000
commit024d4ddc74c9bd7945c4075c972575f20bc5b9bd (patch)
tree2b971635f1fb523d926cfc7d3732e95e5f6f41a2 /src/managers/input/InputManager.cpp
parent717d5b3cc2b9e2f94d3ec1ba794e21bc2bb787e3 (diff)
downloadHyprland-024d4ddc74c9bd7945c4075c972575f20bc5b9bd.tar.gz
Hyprland-024d4ddc74c9bd7945c4075c972575f20bc5b9bd.zip
input: scale local coords in constraints
fixes #5029
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r--src/managers/input/InputManager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index f5ae1638..97d05118 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -152,7 +152,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
const auto RG = CONSTRAINT->logicConstraintRegion();
const auto CLOSEST = RG.closestPoint(mouseCoords);
const auto BOX = SURF->getSurfaceBoxGlobal();
- const auto CLOSESTLOCAL = CLOSEST - (BOX.has_value() ? BOX->pos() : Vector2D{});
+ const auto CLOSESTLOCAL = (CLOSEST - (BOX.has_value() ? BOX->pos() : Vector2D{})) * (SURF->getWindow() ? SURF->getWindow()->m_fX11SurfaceScaledBy : 1.0);
wlr_cursor_warp(g_pCompositor->m_sWLRCursor, nullptr, CLOSEST.x, CLOSEST.y);
wlr_seat_pointer_send_motion(g_pCompositor->m_sSeat.seat, time, CLOSESTLOCAL.x, CLOSESTLOCAL.y);