hyprexpo: chase hyprland

closes #166
This commit is contained in:
Vaxry 2024-05-13 15:19:39 +01:00
parent dcbdc9a08d
commit c2c70332a1
2 changed files with 5 additions and 5 deletions

View File

@ -72,9 +72,9 @@ static void swipeBegin(void* self, SCallbackInfo& info, std::any param) {
return;
}
auto e = std::any_cast<wlr_pointer_swipe_begin_event*>(param);
auto e = std::any_cast<IPointer::SSwipeBeginEvent>(param);
if (!**PENABLE || e->fingers != 4)
if (!**PENABLE || e.fingers != 4)
return;
info.cancelled = true;
@ -94,9 +94,9 @@ static void swipeUpdate(void* self, SCallbackInfo& info, std::any param) {
info.cancelled = true;
auto e = std::any_cast<wlr_pointer_swipe_update_event*>(param);
auto e = std::any_cast<IPointer::SSwipeUpdateEvent>(param);
gestured += (**PPOSITIVE ? 1.0 : -1.0) * e->dy;
gestured += (**PPOSITIVE ? 1.0 : -1.0) * e.delta.y;
g_pOverview->onSwipeUpdate(gestured);
}

View File

@ -22,7 +22,7 @@ COverview::~COverview() {
}
COverview::COverview(PHLWORKSPACE startedOn_, bool swipe_) : startedOn(startedOn_), swipe(swipe_) {
const auto PMONITOR = g_pCompositor->m_pLastMonitor;
const auto PMONITOR = g_pCompositor->m_pLastMonitor.get();
pMonitor = PMONITOR;
static auto* const* PCOLUMNS = (Hyprlang::INT* const*)HyprlandAPI::getConfigValue(PHANDLE, "plugin:hyprexpo:columns")->getDataStaticPtr();