From ca17a89d86b73f37019c4cc0c7087303adbcc1f9 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 25 Mar 2024 16:08:55 +0000 Subject: renderer: allow blurring ls popups --- src/helpers/WLClasses.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/helpers/WLClasses.cpp') diff --git a/src/helpers/WLClasses.cpp b/src/helpers/WLClasses.cpp index d46f7e40..e7ae69c0 100644 --- a/src/helpers/WLClasses.cpp +++ b/src/helpers/WLClasses.cpp @@ -37,6 +37,8 @@ void SLayerSurface::applyRules() { noAnimations = true; else if (rule.rule == "blur") forceBlur = true; + else if (rule.rule == "blurpopups") + forceBlurPopups = true; else if (rule.rule.starts_with("ignorealpha") || rule.rule.starts_with("ignorezero")) { const auto FIRST_SPACE_POS = rule.rule.find_first_of(' '); std::string alphaValue = ""; @@ -168,6 +170,13 @@ bool SLayerSurface::isFadedOut() { return !realPosition.isBeingAnimated() && !realSize.isBeingAnimated() && !alpha.isBeingAnimated(); } +int SLayerSurface::popupsCount() { + 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); + return no; +} + void SKeyboard::updateXKBTranslationState(xkb_keymap* const keymap) { xkb_state_unref(xkbTranslationState); -- cgit v1.2.3