summaryrefslogtreecommitdiff
path: root/src/managers/input/InputManager.cpp
diff options
context:
space:
mode:
authorArchSav <96357545+ArchSav@users.noreply.github.com>2026-03-14 00:48:01 +1100
committerGitHub <noreply@github.com>2026-03-13 08:48:01 -0500
commit24a95621e5118e39e1a6e05b17ef89f4ec2c8c01 (patch)
treea37133cd549fb7107ebbaa5bf60fafd52a5bdd77 /src/managers/input/InputManager.cpp
parente8684034525829d58054c32da914d1713398fbb8 (diff)
input: add device specific binds (#13073)
Adds support for device-specific binds
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r--src/managers/input/InputManager.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index 9195536f..d88b29cd 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -647,7 +647,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus, bool mouse, st
g_pSeatManager->sendPointerMotion(time, surfaceLocal);
}
-void CInputManager::onMouseButton(IPointer::SButtonEvent e) {
+void CInputManager::onMouseButton(IPointer::SButtonEvent e, SP<IPointer> mouse) {
Event::SCallbackInfo info;
Event::bus()->m_events.input.mouse.button.emit(e, info);
if (info.cancelled)
@@ -667,7 +667,7 @@ void CInputManager::onMouseButton(IPointer::SButtonEvent e) {
}
switch (m_clickBehavior) {
- case CLICKMODE_DEFAULT: processMouseDownNormal(e); break;
+ case CLICKMODE_DEFAULT: processMouseDownNormal(e, mouse); break;
case CLICKMODE_KILL: processMouseDownKill(e); break;
default: break;
}
@@ -755,11 +755,11 @@ void CInputManager::setClickMode(eClickBehaviorMode mode) {
}
}
-void CInputManager::processMouseDownNormal(const IPointer::SButtonEvent& e) {
+void CInputManager::processMouseDownNormal(const IPointer::SButtonEvent& e, SP<IPointer> mouse) {
// notify the keybind manager
static auto PPASSMOUSE = CConfigValue<Hyprlang::INT>("binds:pass_mouse_when_bound");
- const auto PASS = g_pKeybindManager->onMouseEvent(e);
+ const auto PASS = g_pKeybindManager->onMouseEvent(e, mouse);
static auto PFOLLOWMOUSE = CConfigValue<Hyprlang::INT>("input:follow_mouse");
static auto PRESIZEONBORDER = CConfigValue<Hyprlang::INT>("general:resize_on_border");
static auto PBORDERSIZE = CConfigValue<Hyprlang::INT>("general:border_size");
@@ -884,7 +884,7 @@ void CInputManager::onMouseWheel(IPointer::SAxisEvent e, SP<IPointer> pointer) {
if (e.mouse)
recheckMouseWarpOnMouseInput();
- bool passEvent = g_pKeybindManager->onAxisEvent(e);
+ bool passEvent = g_pKeybindManager->onAxisEvent(e, pointer);
if (!passEvent)
return;