Skip to content

compositor: cleanup fading out on expired monitor#13179

Open
gulafaran wants to merge 1 commit intohyprwm:mainfrom
gulafaran:cleanup
Open

compositor: cleanup fading out on expired monitor#13179
gulafaran wants to merge 1 commit intohyprwm:mainfrom
gulafaran:cleanup

Conversation

@gulafaran
Copy link
Contributor

hotplugging monitor can leave fading out windows forever stuck in the containers, check if they have a expired monitor and remove them aswell.

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; });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

problem doing && here would mean the el might be expired but monitor might not

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be yes, but in general you cant remove a window until it's marked as ready for destrtoy

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wdym by stuck, whats their state

auto ls = lsr.lock();

if (!ls) {
if (!ls || !ls->m_monitor) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants