mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-25 23:46:00 +01:00
opengl: clear layer fade fbs in ~dtor
This commit is contained in:
parent
45d3fbb8d8
commit
5d100bdcbb
3 changed files with 6 additions and 3 deletions
|
@ -1441,9 +1441,6 @@ void CCompositor::cleanupFadingOut(const int& monid) {
|
|||
g_pHyprOpenGL->markBlurDirtyForMonitor(getMonitorFromID(monid));
|
||||
|
||||
if (ls->fadingOut && ls->readyToDelete && !ls->alpha.isBeingAnimated()) {
|
||||
g_pHyprOpenGL->m_mLayerFramebuffers[ls].release();
|
||||
g_pHyprOpenGL->m_mLayerFramebuffers.erase(ls);
|
||||
|
||||
for (auto& m : m_vMonitors) {
|
||||
for (auto& lsl : m->m_aLayerSurfaceLayers) {
|
||||
if (!lsl.empty() && std::find_if(lsl.begin(), lsl.end(), [&](std::unique_ptr<SLayerSurface>& other) { return other.get() == ls; }) != lsl.end()) {
|
||||
|
|
|
@ -8,6 +8,11 @@ SLayerSurface::SLayerSurface() {
|
|||
alpha.registerVar();
|
||||
}
|
||||
|
||||
SLayerSurface::~SLayerSurface() {
|
||||
g_pHyprRenderer->makeEGLCurrent();
|
||||
std::erase_if(g_pHyprOpenGL->m_mLayerFramebuffers, [&](const auto& other) { return other.first == this; });
|
||||
}
|
||||
|
||||
void SLayerSurface::applyRules() {
|
||||
noAnimations = false;
|
||||
forceBlur = false;
|
||||
|
|
|
@ -16,6 +16,7 @@ struct SLayerRule {
|
|||
|
||||
struct SLayerSurface {
|
||||
SLayerSurface();
|
||||
~SLayerSurface();
|
||||
|
||||
void applyRules();
|
||||
|
||||
|
|
Loading…
Reference in a new issue