input: Apply scaling to cursorPosOnActivate position (#3664)

This commit is contained in:
Tyler Schneider 2023-10-25 19:05:10 -06:00 committed by GitHub
parent 5cc33b4e8c
commit 07714dd5bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {