diff options
| author | Vaxry <vaxry@vaxry.net> | 2026-04-07 14:09:06 +0100 |
|---|---|---|
| committer | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2026-04-07 12:07:36 -0400 |
| commit | 0448e707fce798d6864320ef629ae681845bde26 (patch) | |
| tree | bea6ed92bcb2abef80bef756c60ca167598104ea /src/desktop/view/LayerSurface.cpp | |
| parent | 8a97b11b22422bcb6907a66010388856317c7ff5 (diff) | |
desktop/popup: cache tree count
Diffstat (limited to 'src/desktop/view/LayerSurface.cpp')
| -rw-r--r-- | src/desktop/view/LayerSurface.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/desktop/view/LayerSurface.cpp b/src/desktop/view/LayerSurface.cpp index 90de4cdc..a69dd8e9 100644 --- a/src/desktop/view/LayerSurface.cpp +++ b/src/desktop/view/LayerSurface.cpp @@ -426,12 +426,10 @@ bool CLayerSurface::isFadedOut() { } int CLayerSurface::popupsCount() { - if (!m_layerSurface || !m_mapped || m_fadingOut) + if (!m_layerSurface || !m_mapped || m_fadingOut || !m_popupHead) return 0; - int no = -1; // we have one dummy - m_popupHead->breadthfirst([](WP<Desktop::View::CPopup> p, void* data) { *sc<int*>(data) += 1; }, &no); - return no; + return m_popupHead->popupTreeCount(); } MONITORID CLayerSurface::monitorID() { |
