compositor: cleanup fading out on expired monitor#13179
compositor: cleanup fading out on expired monitor#13179gulafaran wants to merge 1 commit intohyprwm:mainfrom
Conversation
hotplugging monitor can leave fading out windows forever stuck in the containers, check if they have a expired monitor and remove them aswell.
| } | ||
|
|
||
| if (windowsFadingDirty) | ||
| std::erase_if(m_windowsFadingOut, [](const auto& el) { return el.expired() || !el->m_monitor; }); |
There was a problem hiding this comment.
nope, do not remove a window just because it has no monitor. It could still be alive but lost for some reason. If it's destroyed AND no monitor, sure.
There was a problem hiding this comment.
problem doing && here would mean the el might be expired but monitor might not
There was a problem hiding this comment.
could be yes, but in general you cant remove a window until it's marked as ready for destrtoy
There was a problem hiding this comment.
well yeah but some of these containers get stuck with with some stuff when i hotplug the monitor. and && might segfault, el.expired && el->m_monitor will nullptr deref. but i might be going about this the wrong way then, perhaps m_layers or m_windows contains something that it shouldnt so it never expires on hotplugging the monitor hm
There was a problem hiding this comment.
wdym by stuck, whats their state
| auto ls = lsr.lock(); | ||
|
|
||
| if (!ls) { | ||
| if (!ls || !ls->m_monitor) { |
hotplugging monitor can leave fading out windows forever stuck in the containers, check if they have a expired monitor and remove them aswell.