input: Stop propagating axis events after valid binds (#4059)

This commit is contained in:
dranull 2023-12-05 21:16:26 +00:00 committed by GitHub
parent ab66fa430e
commit cfd94c5b30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -699,6 +699,9 @@ void CInputManager::onMouseWheel(wlr_pointer_axis_event* e) {
g_pCompositor->notifyIdleActivity(); g_pCompositor->notifyIdleActivity();
if (!passEvent)
return;
const auto MOUSECOORDS = g_pInputManager->getMouseCoordsInternal(); const auto MOUSECOORDS = g_pInputManager->getMouseCoordsInternal();
const auto pWindow = g_pCompositor->vectorToWindowIdeal(MOUSECOORDS); const auto pWindow = g_pCompositor->vectorToWindowIdeal(MOUSECOORDS);
@ -713,8 +716,7 @@ void CInputManager::onMouseWheel(wlr_pointer_axis_event* e) {
} }
} }
if (passEvent) wlr_seat_pointer_notify_axis(g_pCompositor->m_sSeat.seat, e->time_msec, e->orientation, factor * e->delta, std::round(factor * e->delta_discrete), e->source);
wlr_seat_pointer_notify_axis(g_pCompositor->m_sSeat.seat, e->time_msec, e->orientation, factor * e->delta, std::round(factor * e->delta_discrete), e->source);
} }
Vector2D CInputManager::getMouseCoordsInternal() { Vector2D CInputManager::getMouseCoordsInternal() {