hyprexpo: fix hardcoded distance value (#194)

This commit is contained in:
Leonel Cortés 2024-06-30 18:53:43 -03:00 committed by GitHub
parent 3ae670253a
commit 98cb18c6fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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* 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* 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* 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<IPointer::SSwipeUpdateEvent>(param); auto e = std::any_cast<IPointer::SSwipeUpdateEvent>(param);
if (!swipeDirection) { if (!swipeDirection) {
@ -91,7 +92,7 @@ static void swipeUpdate(void* self, SCallbackInfo& info, std::any param) {
renderingOverview = true; renderingOverview = true;
g_pOverview = std::make_unique<COverview>(g_pCompositor->m_pLastMonitor->activeWorkspace, true); g_pOverview = std::make_unique<COverview>(g_pCompositor->m_pLastMonitor->activeWorkspace, true);
renderingOverview = false; renderingOverview = false;
gestured = 300; gestured = **PDISTANCE;
swipeActive = true; swipeActive = true;
} }
@ -118,7 +119,7 @@ static void swipeEnd(void* self, SCallbackInfo& info, std::any param) {
if (!g_pOverview) if (!g_pOverview)
return; return;
swipeActive = false; swipeActive = false;
info.cancelled = true; info.cancelled = true;
g_pOverview->onSwipeEnd(); g_pOverview->onSwipeEnd();