diff options
| author | Visal Vijay <150381094+B2krobbery@users.noreply.github.com> | 2026-04-12 22:27:06 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-12 17:57:06 +0100 |
| commit | 24b121c7a3df5d4d5d44f19d6e4129ea82fdfc1e (patch) | |
| tree | 5032248bb216c503791e11c0d8b47d83119e7bc2 /src/desktop | |
| parent | fe369dd9fb4d0d5517a1f19c0ff780d9a65b0c57 (diff) | |
cleanup: avoid repeated weak_ptr lock() calls in conditions (#14057)
Diffstat (limited to 'src/desktop')
| -rw-r--r-- | src/desktop/view/LayerSurface.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |
