diff options
Diffstat (limited to 'src/managers/input')
| -rw-r--r-- | src/managers/input/InputManager.cpp | 10 | ||||
| -rw-r--r-- | src/managers/input/InputManager.hpp | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index c922421c..e1f2e98f 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -381,6 +381,16 @@ void CInputManager::processMouseDownKill(wlr_pointer_button_event* e) { m_ecbClickBehavior = CLICKMODE_DEFAULT; } +void CInputManager::onMouseWheel(wlr_pointer_axis_event* e) { + bool passEvent = g_pKeybindManager->onAxisEvent(e); + + wlr_idle_notify_activity(g_pCompositor->m_sWLRIdle, g_pCompositor->m_sSeat.seat); + + if (passEvent) { + wlr_seat_pointer_notify_axis(g_pCompositor->m_sSeat.seat, e->time_msec, e->orientation, e->delta, e->delta_discrete, e->source); + } +} + Vector2D CInputManager::getMouseCoordsInternal() { return Vector2D(g_pCompositor->m_sWLRCursor->x, g_pCompositor->m_sWLRCursor->y); } diff --git a/src/managers/input/InputManager.hpp b/src/managers/input/InputManager.hpp index 107d891f..da821dfc 100644 --- a/src/managers/input/InputManager.hpp +++ b/src/managers/input/InputManager.hpp @@ -17,6 +17,7 @@ public: void onMouseMoved(wlr_pointer_motion_event*); void onMouseWarp(wlr_pointer_motion_absolute_event*); void onMouseButton(wlr_pointer_button_event*); + void onMouseWheel(wlr_pointer_axis_event*); void onKeyboardKey(wlr_keyboard_key_event*, SKeyboard*); void onKeyboardMod(void*, SKeyboard*); |
