input: don't use pointer hold logic for unmapped surfs

fixes #10215
This commit is contained in:
Vaxry 2025-04-30 00:31:15 +01:00
parent 208f4c48db
commit 9868b18378
No known key found for this signature in database
GPG key ID: 665806380871D640
2 changed files with 3 additions and 2 deletions

View file

@ -199,7 +199,7 @@ void CLayerSurface::onUnmap() {
g_pEventManager->postEvent(SHyprIPCEvent{"closelayer", m_layerSurface->layerNamespace});
EMIT_HOOK_EVENT("closeLayer", m_self.lock());
std::erase_if(g_pInputManager->m_dExclusiveLSes, [this](const auto& other) { return !other.lock() || other.lock() == m_self.lock(); });
std::erase_if(g_pInputManager->m_dExclusiveLSes, [this](const auto& other) { return !other || other == m_self; });
if (!m_monitor || g_pCompositor->m_unsafeState) {
Debug::log(WARN, "Layersurface unmapping on invalid monitor (removed?) ignoring.");