mirror of
https://github.com/hyprwm/hyprland-plugins.git
synced 2026-05-09 04:08:01 +02:00
expo: unload gesture on exit
This commit is contained in:
parent
5086bd28f4
commit
44343bf690
1 changed files with 9 additions and 0 deletions
|
|
@ -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…
Add table
Reference in a new issue