summaryrefslogtreecommitdiff
path: root/sway/tree
diff options
context:
space:
mode:
Diffstat (limited to 'sway/tree')
-rw-r--r--sway/tree/workspace.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c
index ee940466..161b1e9c 100644
--- a/sway/tree/workspace.c
+++ b/sway/tree/workspace.c
@@ -690,6 +690,21 @@ void workspace_detect_urgent(struct sway_workspace *workspace) {
}
}
+static bool find_blurred_con_iterator(struct sway_container *con, void *data) {
+ struct sway_view *view = con->view;
+ if (!view) {
+ return false;
+ }
+ return con->blur_enabled && !view->surface->opaque;
+}
+
+bool should_workspace_have_blur(struct sway_workspace *ws) {
+ if (!workspace_is_visible(ws)) {
+ return false;
+ }
+ return (bool)workspace_find_container(ws, find_blurred_con_iterator, NULL);
+}
+
void workspace_for_each_container(struct sway_workspace *ws,
void (*f)(struct sway_container *con, void *data), void *data) {
// Tiling