mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 15:25:58 +01:00
parent
717d5b3cc2
commit
024d4ddc74
1 changed files with 1 additions and 1 deletions
|
@ -152,7 +152,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
|
||||||
const auto RG = CONSTRAINT->logicConstraintRegion();
|
const auto RG = CONSTRAINT->logicConstraintRegion();
|
||||||
const auto CLOSEST = RG.closestPoint(mouseCoords);
|
const auto CLOSEST = RG.closestPoint(mouseCoords);
|
||||||
const auto BOX = SURF->getSurfaceBoxGlobal();
|
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_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);
|
wlr_seat_pointer_send_motion(g_pCompositor->m_sSeat.seat, time, CLOSESTLOCAL.x, CLOSESTLOCAL.y);
|
||||||
|
|
Loading…
Reference in a new issue