From 07714dd5bd9ff60e10170e11b535409e1bbc92ef Mon Sep 17 00:00:00 2001 From: Tyler Schneider Date: Wed, 25 Oct 2023 19:05:10 -0600 Subject: [PATCH] input: Apply scaling to cursorPosOnActivate position (#3664) --- src/managers/input/InputManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 5231a9a71..95240d1ae 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -1202,7 +1202,7 @@ void CInputManager::constrainMouse(SMouse* pMouse, wlr_pointer_constraint_v1* co g_pXWaylandManager->xwaylandToWaylandCoords({PWINDOW->m_uSurface.xwayland->x, PWINDOW->m_uSurface.xwayland->y})) : PWINDOW->m_vRealPosition.goalv(); - PCONSTRAINT->cursorPosOnActivate = MOUSECOORDS - RELATIVETO; + PCONSTRAINT->cursorPosOnActivate = (MOUSECOORDS - RELATIVETO) * PWINDOW->m_fX11SurfaceScaledBy; } if (constraint->current.committed & WLR_POINTER_CONSTRAINT_V1_STATE_CURSOR_HINT) {