minor fixes to X11 configure/or handling

This commit is contained in:
vaxerski
2023-02-28 18:50:47 +00:00
parent 89e7d812c8
commit 7e523e4d5e
4 changed files with 28 additions and 15 deletions

View File

@@ -498,10 +498,6 @@ CMonitor* CCompositor::getMonitorFromVector(const Vector2D& point) {
void CCompositor::removeWindowFromVectorSafe(CWindow* pWindow) {
if (windowExists(pWindow) && !pWindow->m_bFadingOut) {
if (pWindow->m_bIsX11 && pWindow->m_iX11Type == 2) {
std::erase_if(m_dUnmanagedX11Windows, [&](std::unique_ptr<CWindow>& el) { return el.get() == pWindow; });
}
// if X11, also check its children
// and delete any needed
if (pWindow->m_bIsX11) {
@@ -519,6 +515,10 @@ void CCompositor::removeWindowFromVectorSafe(CWindow* pWindow) {
}
}
if (pWindow->m_bIsX11 && pWindow->m_iX11Type == 2) {
std::erase_if(m_dUnmanagedX11Windows, [&](std::unique_ptr<CWindow>& el) { return el.get() == pWindow; });
}
std::erase_if(m_vWindows, [&](std::unique_ptr<CWindow>& el) { return el.get() == pWindow; });
}
}
@@ -529,6 +529,11 @@ bool CCompositor::windowExists(CWindow* pWindow) {
return true;
}
for (auto& u : m_dUnmanagedX11Windows) {
if (u.get() == pWindow)
return true;
}
return false;
}