diff options
Diffstat (limited to 'src/managers/input')
| -rw-r--r-- | src/managers/input/InputManager.cpp | 18 | ||||
| -rw-r--r-- | src/managers/input/InputManager.hpp | 4 | ||||
| -rw-r--r-- | src/managers/input/InputMethodRelay.cpp | 8 | ||||
| -rw-r--r-- | src/managers/input/Tablets.cpp | 10 |
4 files changed, 20 insertions, 20 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index ccb9bda5..a5ba9c65 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -288,7 +288,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { if (*PFOLLOWMOUSE != 0 || pFoundWindow == g_pCompositor->m_pLastWindow) wlr_seat_pointer_notify_motion(g_pCompositor->m_sSeat.seat, time, surfaceLocal.x, surfaceLocal.y); - + m_bLastFocusOnLS = false; return; // don't enter any new surfaces } else { @@ -372,7 +372,7 @@ void CInputManager::setClickMode(eClickBehaviorMode mode) { break; default: break; - } + } } void CInputManager::processMouseDownNormal(wlr_pointer_button_event* e) { @@ -467,11 +467,11 @@ void CInputManager::newKeyboard(wlr_input_device* keyboard) { const auto PKEYBOARD = (SKeyboard*)owner; g_pEventManager->postEvent(SHyprIPCEvent{"activelayout", PKEYBOARD->name + "," +getActiveLayoutForKeyboard(PKEYBOARD)}, true); // force as this should ALWAYS be sent - + }, PNEWKEYBOARD, "Keyboard"); disableAllKeyboards(false); - + m_pActiveKeyboard = PNEWKEYBOARD; PNEWKEYBOARD->active = true; @@ -502,7 +502,7 @@ void CInputManager::newVirtualKeyboard(wlr_input_device* keyboard) { const auto PKEYBOARD = (SKeyboard*)owner; g_pEventManager->postEvent(SHyprIPCEvent{"activelayout", PKEYBOARD->name + "," +getActiveLayoutForKeyboard(PKEYBOARD)}, true); // force as this should ALWAYS be sent - + }, PNEWKEYBOARD, "Keyboard"); disableAllKeyboards(true); @@ -599,7 +599,7 @@ void CInputManager::applyConfigToKeyboard(SKeyboard* pKeyboard) { } else { KEYMAP = xkb_keymap_new_from_file(CONTEXT, fopen(path.c_str(), "r"), XKB_KEYMAP_FORMAT_TEXT_V1, XKB_KEYMAP_COMPILE_NO_FLAGS); } - } + } if (!KEYMAP) { KEYMAP = xkb_keymap_new_from_names(CONTEXT, &rules, XKB_KEYMAP_COMPILE_NO_FLAGS); @@ -642,7 +642,7 @@ void CInputManager::applyConfigToKeyboard(SKeyboard* pKeyboard) { g_pEventManager->postEvent(SHyprIPCEvent{"activelayout", pKeyboard->name + "," +getActiveLayoutForKeyboard(pKeyboard)}, true); // force as this should ALWAYS be sent Debug::log(LOG, "Set the keyboard layout to %s and variant to %s for keyboard \"%s\"", rules.layout, rules.variant, pKeyboard->keyboard->name); -} +} void CInputManager::newMouse(wlr_input_device* mouse, bool virt) { m_lMice.emplace_back(); @@ -879,7 +879,7 @@ void CInputManager::constrainMouse(SMouse* pMouse, wlr_pointer_constraint_v1* co } } } - + wlr_pointer_constraint_v1_send_deactivated(pMouse->currentConstraint); } @@ -969,7 +969,7 @@ std::string CInputManager::getActiveLayoutForKeyboard(SKeyboard* pKeyboard) { if (xkb_state_layout_index_is_active(STATE, i, XKB_STATE_LAYOUT_EFFECTIVE)) { const auto LAYOUTNAME = xkb_keymap_layout_get_name(KEYMAP, i); - if (LAYOUTNAME) + if (LAYOUTNAME) return std::string(LAYOUTNAME); return "error"; } diff --git a/src/managers/input/InputManager.hpp b/src/managers/input/InputManager.hpp index 17fd6271..85af33fc 100644 --- a/src/managers/input/InputManager.hpp +++ b/src/managers/input/InputManager.hpp @@ -29,7 +29,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 onMouseWheel(wlr_pointer_axis_event*); void onKeyboardKey(wlr_keyboard_key_event*, SKeyboard*); void onKeyboardMod(void*, SKeyboard*); @@ -136,4 +136,4 @@ private: void applyConfigToKeyboard(SKeyboard*); }; -inline std::unique_ptr<CInputManager> g_pInputManager;
\ No newline at end of file +inline std::unique_ptr<CInputManager> g_pInputManager; diff --git a/src/managers/input/InputMethodRelay.cpp b/src/managers/input/InputMethodRelay.cpp index f9582f54..25d8dfb9 100644 --- a/src/managers/input/InputMethodRelay.cpp +++ b/src/managers/input/InputMethodRelay.cpp @@ -97,7 +97,7 @@ void CInputMethodRelay::onNewIME(wlr_input_method_v2* pIME) { }, this, "IMERelay"); hyprListener_IMENewPopup.initCallback(&m_pWLRIME->events.new_popup_surface, [&](void* owner, void* data) { - + const auto PNEWPOPUP = &m_lIMEPopups.emplace_back(); PNEWPOPUP->pSurface = (wlr_input_popup_surface_v2*)data; @@ -120,7 +120,7 @@ void CInputMethodRelay::onNewIME(wlr_input_method_v2* pIME) { } void CInputMethodRelay::updateInputPopup(SIMEPopup* pPopup) { - if (!pPopup->pSurface->mapped) + if (!pPopup->pSurface->mapped) return; // damage last known pos & size @@ -404,7 +404,7 @@ void CInputMethodRelay::onKeyboardFocus(wlr_surface* pSurface) { for (auto& ti : m_lTextInputs) { if (ti.pPendingSurface) { - if (pSurface != ti.pPendingSurface) + if (pSurface != ti.pPendingSurface) setPendingSurface(&ti, nullptr); } else if (ti.pWlrInput->focused_surface) { @@ -446,4 +446,4 @@ void CInputMethodRelay::setPendingSurface(STextInput* pInput, wlr_surface* pSurf } else { pInput->hyprListener_pendingSurfaceDestroy.removeCallback(); } -}
\ No newline at end of file +} diff --git a/src/managers/input/Tablets.cpp b/src/managers/input/Tablets.cpp index ba79c458..173f6961 100644 --- a/src/managers/input/Tablets.cpp +++ b/src/managers/input/Tablets.cpp @@ -66,7 +66,7 @@ void CInputManager::newTabletTool(wlr_input_device* pDevice) { if (EVENT->updated_axes & WLR_TABLET_TOOL_AXIS_SLIDER) wlr_tablet_v2_tablet_tool_notify_slider(PTOOL->wlrTabletToolV2, EVENT->slider); - if (EVENT->updated_axes & WLR_TABLET_TOOL_AXIS_WHEEL) + if (EVENT->updated_axes & WLR_TABLET_TOOL_AXIS_WHEEL) wlr_tablet_v2_tablet_tool_notify_wheel(PTOOL->wlrTabletToolV2, EVENT->wheel_delta, 0); if (EVENT->updated_axes & WLR_TABLET_TOOL_AXIS_TILT_X) @@ -95,7 +95,7 @@ void CInputManager::newTabletTool(wlr_input_device* pDevice) { else { wlr_send_tablet_v2_tablet_tool_up(PTOOL->wlrTabletToolV2); } - + }, PNEWTABLET, "Tablet"); PNEWTABLET->hyprListener_Button.initCallback(&wlr_tablet_from_input_device(pDevice)->events.button, [](void* owner, void* data) { @@ -104,7 +104,7 @@ void CInputManager::newTabletTool(wlr_input_device* pDevice) { const auto PTOOL = g_pInputManager->ensureTabletToolPresent(EVENT->tool); wlr_tablet_v2_tablet_tool_notify_button(PTOOL->wlrTabletToolV2, (zwp_tablet_pad_v2_button_state)EVENT->button, (zwp_tablet_pad_v2_button_state)EVENT->state); - + }, PNEWTABLET, "Tablet"); PNEWTABLET->hyprListener_Proximity.initCallback(&wlr_tablet_from_input_device(pDevice)->events.proximity, [](void* owner, void* data) { @@ -120,13 +120,13 @@ void CInputManager::newTabletTool(wlr_input_device* pDevice) { wlr_tablet_v2_tablet_tool_notify_proximity_out(PTOOL->wlrTabletToolV2); PTOOL->pSurface = nullptr; } - + } else { PTOOL->active = true; g_pInputManager->refocus(); g_pInputManager->focusTablet(PTAB, EVENT->tool); } - + }, PNEWTABLET, "Tablet"); } |
