aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authordranull <[email protected]>2023-12-05 21:16:26 +0000
committerGitHub <[email protected]>2023-12-05 21:16:26 +0000
commitcfd94c5b30719c1c512b0d0ef4366a0cb64793e0 (patch)
tree6ee0d462cb1e69f0d88aeb52212fdcd21571d65c
parentab66fa430efd1e8b9b6a0220b896998215fff8c3 (diff)
downloadHyprland-cfd94c5b30719c1c512b0d0ef4366a0cb64793e0.tar.gz
Hyprland-cfd94c5b30719c1c512b0d0ef4366a0cb64793e0.zip
input: Stop propagating axis events after valid binds (#4059)
-rw-r--r--src/managers/input/InputManager.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index 25f0e34c..b3aadeed 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -699,6 +699,9 @@ void CInputManager::onMouseWheel(wlr_pointer_axis_event* e) {
g_pCompositor->notifyIdleActivity();
+ if (!passEvent)
+ return;
+
const auto MOUSECOORDS = g_pInputManager->getMouseCoordsInternal();
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() {