From c2c70332a173c93b568ba41a5bb17c66db58d95e Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 13 May 2024 15:19:39 +0100 Subject: [PATCH] hyprexpo: chase hyprland closes #166 --- hyprexpo/main.cpp | 8 ++++---- hyprexpo/overview.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hyprexpo/main.cpp b/hyprexpo/main.cpp index 1b54f8d..676084e 100644 --- a/hyprexpo/main.cpp +++ b/hyprexpo/main.cpp @@ -72,9 +72,9 @@ static void swipeBegin(void* self, SCallbackInfo& info, std::any param) { return; } - auto e = std::any_cast(param); + auto e = std::any_cast(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(param); + auto e = std::any_cast(param); - gestured += (**PPOSITIVE ? 1.0 : -1.0) * e->dy; + gestured += (**PPOSITIVE ? 1.0 : -1.0) * e.delta.y; g_pOverview->onSwipeUpdate(gestured); } diff --git a/hyprexpo/overview.cpp b/hyprexpo/overview.cpp index 515c1a8..4945d90 100644 --- a/hyprexpo/overview.cpp +++ b/hyprexpo/overview.cpp @@ -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();