mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-17 05:25:58 +01:00
layersurface: don't unref from monitor until dtor
reee
This commit is contained in:
parent
688fe5c147
commit
e45e606fbd
1 changed files with 6 additions and 6 deletions
|
@ -71,6 +71,12 @@ CLayerSurface::~CLayerSurface() {
|
||||||
surface->unassign();
|
surface->unassign();
|
||||||
g_pHyprRenderer->makeEGLCurrent();
|
g_pHyprRenderer->makeEGLCurrent();
|
||||||
std::erase_if(g_pHyprOpenGL->m_mLayerFramebuffers, [&](const auto& other) { return other.first.expired() || other.first.lock() == self.lock(); });
|
std::erase_if(g_pHyprOpenGL->m_mLayerFramebuffers, [&](const auto& other) { return other.first.expired() || other.first.lock() == self.lock(); });
|
||||||
|
|
||||||
|
for (auto& mon : g_pCompositor->m_vRealMonitors) {
|
||||||
|
for (auto& lsl : mon->m_aLayerSurfaceLayers) {
|
||||||
|
std::erase_if(lsl, [this](auto& ls) { return ls.expired() || ls.get() == this; });
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CLayerSurface::onDestroy() {
|
void CLayerSurface::onDestroy() {
|
||||||
|
@ -107,12 +113,6 @@ void CLayerSurface::onDestroy() {
|
||||||
g_pHyprRenderer->damageBox(&geomFixed);
|
g_pHyprRenderer->damageBox(&geomFixed);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto& mon : g_pCompositor->m_vRealMonitors) {
|
|
||||||
for (auto& lsl : mon->m_aLayerSurfaceLayers) {
|
|
||||||
std::erase_if(lsl, [this](auto& ls) { return ls.expired() || ls.get() == this; });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
readyToDelete = true;
|
readyToDelete = true;
|
||||||
layerSurface.reset();
|
layerSurface.reset();
|
||||||
if (surface)
|
if (surface)
|
||||||
|
|
Loading…
Reference in a new issue