all: avoid crash on unload if using render pass elements

fixes #264
This commit is contained in:
Vaxry 2025-01-02 18:17:21 +01:00
parent a41bcdccac
commit 920af33577
4 changed files with 9 additions and 2 deletions

View file

@ -6,6 +6,7 @@
#include <hyprland/src/Compositor.hpp>
#include <hyprland/src/desktop/Window.hpp>
#include <hyprland/src/config/ConfigManager.hpp>
#include <hyprland/src/render/Renderer.hpp>
#include "borderDeco.hpp"
#include "globals.hpp"
@ -59,5 +60,5 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) {
}
APICALL EXPORT void PLUGIN_EXIT() {
;
g_pHyprRenderer->m_sRenderPass.removeAllOfType("CBorderPPPassElement");
}

View file

@ -6,6 +6,7 @@
#include <hyprland/src/Compositor.hpp>
#include <hyprland/src/desktop/Window.hpp>
#include <hyprland/src/config/ConfigManager.hpp>
#include <hyprland/src/render/Renderer.hpp>
#include "barDeco.hpp"
#include "globals.hpp"
@ -141,4 +142,6 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) {
APICALL EXPORT void PLUGIN_EXIT() {
for (auto& m : g_pCompositor->m_vMonitors)
m->scheduledRecalc = true;
g_pHyprRenderer->m_sRenderPass.removeAllOfType("CBarPassElement");
}

View file

@ -6,6 +6,7 @@
#include <hyprland/src/desktop/Window.hpp>
#include <hyprland/src/config/ConfigManager.hpp>
#include <hyprland/src/desktop/DesktopTypes.hpp>
#include <hyprland/src/render/Renderer.hpp>
#include "globals.hpp"
#include "overview.hpp"
@ -229,5 +230,5 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) {
}
APICALL EXPORT void PLUGIN_EXIT() {
;
g_pHyprRenderer->m_sRenderPass.removeAllOfType("COverviewPassElement");
}

View file

@ -7,6 +7,7 @@
#include <hyprland/src/desktop/Window.hpp>
#include <hyprland/src/config/ConfigManager.hpp>
#include <hyprland/src/render/Shaders.hpp>
#include <hyprland/src/render/Renderer.hpp>
#include "globals.hpp"
#include "shaders.hpp"
@ -135,4 +136,5 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) {
APICALL EXPORT void PLUGIN_EXIT() {
wl_event_source_remove(g_pGlobalState->tick);
g_pHyprRenderer->m_sRenderPass.removeAllOfType("CTrailPassElement");
}