Skip to content

Commit

Permalink
chore: remove unneeded changes
Browse files Browse the repository at this point in the history
  • Loading branch information
matt1432 committed Nov 14, 2024
1 parent 163ac2a commit 7931923
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
7 changes: 3 additions & 4 deletions src/GestureManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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 = {
Expand Down
5 changes: 2 additions & 3 deletions src/GestureManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 7931923

Please sign in to comment.