summaryrefslogtreecommitdiff
path: root/src/desktop/view/LayerSurface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/desktop/view/LayerSurface.cpp')
-rw-r--r--src/desktop/view/LayerSurface.cpp6
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() {