diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2026-04-26 15:16:36 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-26 15:16:36 +0100 |
| commit | 5ba33f846129f3e6c0505b19f94634b24505e828 (patch) | |
| tree | aaacabe678006040c342935481a86607c66607fd /src/managers/input/Touch.cpp | |
| parent | 329b2b356dd92ac07f4e2aa69cbce82ee9ba9d19 (diff) | |
config/lua: init lua config manager, use lua if available (#13817)
Adds a new lua config manager, which will automatically be used if there is a lua config present.
Diffstat (limited to 'src/managers/input/Touch.cpp')
| -rw-r--r-- | src/managers/input/Touch.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/managers/input/Touch.cpp b/src/managers/input/Touch.cpp index 942c168c..f49db8b7 100644 --- a/src/managers/input/Touch.cpp +++ b/src/managers/input/Touch.cpp @@ -15,13 +15,13 @@ void CInputManager::onTouchDown(ITouch::SDownEvent e) { m_lastInputTouch = true; - static auto PSWIPETOUCH = CConfigValue<Hyprlang::INT>("gestures:workspace_swipe_touch"); - static auto PGAPSOUTDATA = CConfigValue<Hyprlang::CUSTOMTYPE>("general:gaps_out"); - auto* const PGAPSOUT = sc<Config::CCssGapData*>((PGAPSOUTDATA.ptr())->getData()); + static auto PSWIPETOUCH = CConfigValue<Config::INTEGER>("gestures:workspace_swipe_touch"); + static auto PGAPSOUTDATA = CConfigValue<Config::IComplexConfigValue>("general:gaps_out"); + auto* const PGAPSOUT = sc<Config::CCssGapData*>((PGAPSOUTDATA.ptr())); // TODO: WORKSPACERULE.gapsOut.value_or() auto gapsOut = *PGAPSOUT; - static auto PBORDERSIZE = CConfigValue<Hyprlang::INT>("general:border_size"); - static auto PSWIPEINVR = CConfigValue<Hyprlang::INT>("gestures:workspace_swipe_touch_invert"); + static auto PBORDERSIZE = CConfigValue<Config::INTEGER>("general:border_size"); + static auto PSWIPEINVR = CConfigValue<Config::INTEGER>("gestures:workspace_swipe_touch_invert"); Event::SCallbackInfo info; Event::bus()->m_events.input.touch.down.emit(e, info); @@ -149,8 +149,8 @@ void CInputManager::onTouchMove(ITouch::SMotionEvent e) { const auto ANIMSTYLE = g_pUnifiedWorkspaceSwipe->m_workspaceBegin->m_renderOffset->getStyle(); const bool VERTANIMS = ANIMSTYLE == "slidevert" || ANIMSTYLE.starts_with("slidefadevert"); - static auto PSWIPEINVR = CConfigValue<Hyprlang::INT>("gestures:workspace_swipe_touch_invert"); - static auto PSWIPEDIST = CConfigValue<Hyprlang::INT>("gestures:workspace_swipe_distance"); + static auto PSWIPEINVR = CConfigValue<Config::INTEGER>("gestures:workspace_swipe_touch_invert"); + static auto PSWIPEDIST = CConfigValue<Config::INTEGER>("gestures:workspace_swipe_distance"); const auto SWIPEDISTANCE = std::clamp(*PSWIPEDIST, sc<int64_t>(1LL), sc<int64_t>(UINT32_MAX)); // Handle the workspace swipe if there is one if (g_pUnifiedWorkspaceSwipe->m_initialDirection == -1) { |
