From 24b121c7a3df5d4d5d44f19d6e4129ea82fdfc1e Mon Sep 17 00:00:00 2001 From: Visal Vijay <150381094+B2krobbery@users.noreply.github.com> Date: Sun, 12 Apr 2026 22:27:06 +0530 Subject: cleanup: avoid repeated weak_ptr lock() calls in conditions (#14057) --- src/desktop/view/LayerSurface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/desktop/view/LayerSurface.cpp') diff --git a/src/desktop/view/LayerSurface.cpp b/src/desktop/view/LayerSurface.cpp index a69dd8e9..ec7c61f2 100644 --- a/src/desktop/view/LayerSurface.cpp +++ b/src/desktop/view/LayerSurface.cpp @@ -388,7 +388,7 @@ void CLayerSurface::onCommit() { if (!WASEXCLUSIVE && ISEXCLUSIVE) g_pInputManager->m_exclusiveLSes.push_back(m_self); else if (WASEXCLUSIVE && !ISEXCLUSIVE) - std::erase_if(g_pInputManager->m_exclusiveLSes, [this](const auto& other) { return !other.lock() || other.lock() == m_self.lock(); }); + std::erase_if(g_pInputManager->m_exclusiveLSes, [this](const auto& other) { return !other || other == m_self; }); // if the surface was focused and interactive but now isn't, refocus if (WASLASTFOCUS && m_layerSurface->m_current.interactivity == ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_NONE) { -- cgit v1.2.3