From 44343bf690259ca166d422c3b933e1bb147e6807 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Thu, 11 Sep 2025 21:17:56 +0100 Subject: [PATCH] expo: unload gesture on exit --- hyprexpo/main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hyprexpo/main.cpp b/hyprexpo/main.cpp index 0994b9b..03e7a18 100644 --- a/hyprexpo/main.cpp +++ b/hyprexpo/main.cpp @@ -25,6 +25,8 @@ typedef void (*origRenderWorkspace)(void*, PHLMONITOR, PHLWORKSPACE, timespec*, typedef void (*origAddDamageA)(void*, const CBox&); typedef void (*origAddDamageB)(void*, const pixman_region32_t*); +static bool g_unloading = false; + // Do NOT change this function. APICALL EXPORT std::string PLUGIN_API_VERSION() { return HYPRLAND_API_VERSION; @@ -107,6 +109,9 @@ static void failNotif(const std::string& reason) { static Hyprlang::CParseResult expoGestureKeyword(const char* LHS, const char* RHS) { Hyprlang::CParseResult result; + if (g_unloading) + return result; + CConstVarList data(RHS); size_t fingerCount = 0; @@ -242,4 +247,8 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) { APICALL EXPORT void PLUGIN_EXIT() { g_pHyprRenderer->m_renderPass.removeAllOfType("COverviewPassElement"); + + g_unloading = true; + + g_pConfigManager->reload(); // we need to reload now to clear all the gestures }