diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-07-26 14:50:21 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-07-26 14:50:21 +0200 |
| commit | 66eac124e263073d3f6f7afdd3a5bfc35eb15353 (patch) | |
| tree | c7a3d2a7f1ecde8a3e1d0ba12f32de54bb4711ac /src/managers/input | |
| parent | d04f36c57d231e4736de750b1a86d6e971350224 (diff) | |
add binding to mouse buttons
Diffstat (limited to 'src/managers/input')
| -rw-r--r-- | src/managers/input/InputManager.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index e1f2e98f..fae0d03b 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -323,6 +323,13 @@ void CInputManager::processMouseDownNormal(wlr_pointer_button_event* e) { return; } + // notify the keybind manager + static auto *const PPASSMOUSE = &g_pConfigManager->getConfigValuePtr("binds:pass_mouse_when_bound")->intValue; + const auto PASS = g_pKeybindManager->onMouseEvent(e); + + if (!PASS && !*PPASSMOUSE) + return; + switch (e->state) { case WLR_BUTTON_PRESSED: if (!g_pCompositor->m_sSeat.mouse->currentConstraint) |
