summaryrefslogtreecommitdiff
path: root/src/helpers
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-03-25 16:08:55 +0000
committerVaxry <vaxry@vaxry.net>2024-03-25 16:09:02 +0000
commitca17a89d86b73f37019c4cc0c7087303adbcc1f9 (patch)
treeedbaabbc0a73109465228f7d5270e5163c6b6ca6 /src/helpers
parent356414639fc06ace7045236ec41d673342981057 (diff)
renderer: allow blurring ls popups
Diffstat (limited to 'src/helpers')
-rw-r--r--src/helpers/WLClasses.cpp9
-rw-r--r--src/helpers/WLClasses.hpp2
2 files changed, 11 insertions, 0 deletions
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);
diff --git a/src/helpers/WLClasses.hpp b/src/helpers/WLClasses.hpp
index 7db656d8..f1311e42 100644
--- a/src/helpers/WLClasses.hpp
+++ b/src/helpers/WLClasses.hpp
@@ -22,6 +22,7 @@ struct SLayerSurface {
void applyRules();
void startAnimation(bool in, bool instant = false);
bool isFadedOut();
+ int popupsCount();
CAnimatedVariable<Vector2D> realPosition;
CAnimatedVariable<Vector2D> realSize;
@@ -58,6 +59,7 @@ struct SLayerSurface {
bool noAnimations = false;
bool forceBlur = false;
+ bool forceBlurPopups = false;
int xray = -1;
bool ignoreAlpha = false;
float ignoreAlphaValue = 0.f;