summaryrefslogtreecommitdiff
path: root/src/helpers/WLClasses.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/helpers/WLClasses.cpp')
-rw-r--r--src/helpers/WLClasses.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/helpers/WLClasses.cpp b/src/helpers/WLClasses.cpp
index e7ae69c0..5e18c274 100644
--- a/src/helpers/WLClasses.cpp
+++ b/src/helpers/WLClasses.cpp
@@ -171,6 +171,9 @@ bool SLayerSurface::isFadedOut() {
}
int SLayerSurface::popupsCount() {
+ if (!layerSurface || !mapped || fadingOut)
+ return 0;
+
int no = 0;
wlr_layer_surface_v1_for_each_popup_surface(
layerSurface, [](wlr_surface* s, int x, int y, void* data) { *(int*)data += 1; }, &no);