internal: minor fixups for fading out xwayland windows

fixes #4935
This commit is contained in:
Vaxry
2024-03-14 18:25:28 +00:00
parent 3e67ee0f5f
commit 164e92f8e3
4 changed files with 25 additions and 9 deletions

View File

@@ -1433,11 +1433,15 @@ void CCompositor::cleanupFadingOut(const int& monid) {
bool valid = windowExists(w);
if (!valid || !w->m_bFadingOut || w->m_fAlpha.value() == 0.f) {
if (valid && !w->m_bReadyToDelete)
continue;
if (valid) {
w->m_bFadingOut = false;
if (!w->m_bReadyToDelete)
continue;
removeWindowFromVectorSafe(w);
}
w->m_bFadingOut = false;
removeWindowFromVectorSafe(w);
std::erase(m_vWindowsFadingOut, w);
Debug::log(LOG, "Cleanup: destroyed a window");