Skip to content

Commit

Permalink
fixup! fix: move cursor during dragGestureUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
horriblename committed Dec 26, 2023
1 parent 33d2463 commit 87a9301
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/GestureManager.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "GestureManager.hpp"
#include "hyprland/src/managers/LayoutManager.hpp"
#include "wayfire/touch/touch.hpp"
#include <algorithm>
#include <cstdint>
Expand Down Expand Up @@ -156,9 +157,13 @@ void GestureManager::dragGestureUpdate(const wf::touch::gesture_event_t& ev) {
case DragGestureType::SWIPE:
emulateSwipeUpdate(ev.time);
return;
case DragGestureType::HOLD:
wlr_cursor_warp(g_pCompositor->m_sWLRCursor, nullptr, ev.pos.x, ev.pos.y);
case DragGestureType::HOLD: {
const auto pos = this->m_sGestureState.get_center().current;
wlr_cursor_warp(g_pCompositor->m_sWLRCursor, nullptr, pos.x, pos.y);
// HACK: g_pInputManager->onMouseMoveUnified is private so I'm using just this
g_pLayoutManager->getCurrentLayout()->onMouseMove(Vector2D(pos.x, pos.y));
return;
}
}
}

Expand Down

0 comments on commit 87a9301

Please sign in to comment.