From 7931923a28e444d495cda4ac1365986c4b312529 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Thu, 14 Nov 2024 03:25:30 -0500 Subject: [PATCH] chore: remove unneeded changes --- src/GestureManager.cpp | 7 +++---- src/GestureManager.hpp | 5 ++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/GestureManager.cpp b/src/GestureManager.cpp index 5147e90..a6dc1aa 100644 --- a/src/GestureManager.cpp +++ b/src/GestureManager.cpp @@ -105,6 +105,9 @@ bool GestureManager::handleDragGesture(const DragGestureEvent& gev) { static auto const WORKSPACE_SWIPE_EDGE = (Hyprlang::STRING const*)HyprlandAPI::getConfigValue(PHANDLE, "plugin:touch_gestures:workspace_swipe_edge") ->getDataStaticPtr(); + static auto const WORKSPACE_SWIPE_FINGERS = + (Hyprlang::INT* const*)HyprlandAPI::getConfigValue(PHANDLE, "plugin:touch_gestures:workspace_swipe_fingers") + ->getDataStaticPtr(); static auto const RESIZE_LONG_PRESS = (Hyprlang::INT* const*)HyprlandAPI::getConfigValue(PHANDLE, "plugin:touch_gestures:resize_on_border_long_press") ->getDataStaticPtr(); @@ -122,10 +125,6 @@ bool GestureManager::handleDragGesture(const DragGestureEvent& gev) { switch (gev.type) { case DragGestureType::SWIPE: { - static auto const WORKSPACE_SWIPE_FINGERS = (Hyprlang::INT* const*)HyprlandAPI::getConfigValue( - PHANDLE, "plugin:touch_gestures:workspace_swipe_fingers") - ->getDataStaticPtr(); - if (**WORKSPACE_SWIPE_FINGERS == gev.finger_count) { if (!g_pGestureManager->handleWorkspaceSwipe(gev.direction)) { IPointer::SSwipeBeginEvent ev = { diff --git a/src/GestureManager.hpp b/src/GestureManager.hpp index 3f97c5d..b7f5e98 100644 --- a/src/GestureManager.hpp +++ b/src/GestureManager.hpp @@ -41,9 +41,6 @@ class GestureManager : public IGestureManager { // workaround void touchBindDispatcher(std::string args); - bool handleWorkspaceSwipe(const GestureDirection direction); - void updateWorkspaceSwipe(); - protected: SMonitorArea getMonitorArea() const override; bool handleCompletedGesture(const CompletedGestureEvent& gev) override; @@ -67,6 +64,8 @@ class GestureManager : public IGestureManager { wf::touch::point_t wlrTouchEventPositionAsPixels(double x, double y) const; // reverse of wlrTouchEventPositionAsPixels Vector2D pixelPositionToPercentagePosition(wf::touch::point_t) const; + bool handleWorkspaceSwipe(const GestureDirection direction); + void updateWorkspaceSwipe(); bool handleDragGesture(const DragGestureEvent& gev) override; void dragGestureUpdate(const wf::touch::gesture_event_t&) override;