add binding to mouse buttons

This commit is contained in:
vaxerski
2022-07-26 14:50:21 +02:00
parent d04f36c57d
commit 66eac124e2
4 changed files with 32 additions and 0 deletions

View File

@@ -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)