mirror of
https://github.com/hyprwm/hyprland-plugins.git
synced 2025-10-30 04:12:43 +00:00
expo: unload gesture on exit
This commit is contained in:
parent
5086bd28f4
commit
44343bf690
@ -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
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user