From 98cb18c6fcfe8196ef4150d09fbae305b7bb2954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonel=20Cort=C3=A9s?= Date: Sun, 30 Jun 2024 18:53:43 -0300 Subject: [PATCH] hyprexpo: fix hardcoded distance value (#194) --- hyprexpo/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hyprexpo/main.cpp b/hyprexpo/main.cpp index 7f68acc..b5d8da8 100644 --- a/hyprexpo/main.cpp +++ b/hyprexpo/main.cpp @@ -68,6 +68,7 @@ static void swipeUpdate(void* self, SCallbackInfo& info, std::any param) { static auto* const* PENABLE = (Hyprlang::INT* const*)HyprlandAPI::getConfigValue(PHANDLE, "plugin:hyprexpo:enable_gesture")->getDataStaticPtr(); static auto* const* FINGERS = (Hyprlang::INT* const*)HyprlandAPI::getConfigValue(PHANDLE, "plugin:hyprexpo:gesture_fingers")->getDataStaticPtr(); static auto* const* PPOSITIVE = (Hyprlang::INT* const*)HyprlandAPI::getConfigValue(PHANDLE, "plugin:hyprexpo:gesture_positive")->getDataStaticPtr(); + static auto* const* PDISTANCE = (Hyprlang::INT* const*)HyprlandAPI::getConfigValue(PHANDLE, "plugin:hyprexpo:gesture_distance")->getDataStaticPtr(); auto e = std::any_cast(param); if (!swipeDirection) { @@ -91,7 +92,7 @@ static void swipeUpdate(void* self, SCallbackInfo& info, std::any param) { renderingOverview = true; g_pOverview = std::make_unique(g_pCompositor->m_pLastMonitor->activeWorkspace, true); renderingOverview = false; - gestured = 300; + gestured = **PDISTANCE; swipeActive = true; } @@ -118,7 +119,7 @@ static void swipeEnd(void* self, SCallbackInfo& info, std::any param) { if (!g_pOverview) return; - swipeActive = false; + swipeActive = false; info.cancelled = true; g_pOverview->onSwipeEnd();