mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-09 00:21:56 -07:00
compositor: remove windows from fadingOut properly
This commit is contained in:
@@ -692,11 +692,11 @@ CMonitor* CCompositor::getMonitorFromVector(const Vector2D& point) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CCompositor::removeWindowFromVectorSafe(CWindow* pWindow) {
|
void CCompositor::removeWindowFromVectorSafe(CWindow* pWindow) {
|
||||||
if (windowExists(pWindow) && !pWindow->m_bFadingOut)
|
if (windowExists(pWindow) && !pWindow->m_bFadingOut) {
|
||||||
std::erase_if(m_vWindows, [&](std::unique_ptr<CWindow>& el) { return el.get() == pWindow; });
|
std::erase_if(m_vWindows, [&](std::unique_ptr<CWindow>& el) { return el.get() == pWindow; });
|
||||||
|
|
||||||
std::erase_if(m_vWindowsFadingOut, [&](CWindow* el) { return el == pWindow; });
|
std::erase_if(m_vWindowsFadingOut, [&](CWindow* el) { return el == pWindow; });
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool CCompositor::windowExists(CWindow* pWindow) {
|
bool CCompositor::windowExists(CWindow* pWindow) {
|
||||||
for (auto& w : m_vWindows) {
|
for (auto& w : m_vWindows) {
|
||||||
|
Reference in New Issue
Block a user