aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/workspace.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/tree/workspace.c')
-rw-r--r--sway/tree/workspace.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c
index b8e90892..d4b57a0f 100644
--- a/sway/tree/workspace.c
+++ b/sway/tree/workspace.c
@@ -694,3 +694,16 @@ void workspace_get_box(struct sway_workspace *workspace, struct wlr_box *box) {
694 box->width = workspace->width; 694 box->width = workspace->width;
695 box->height = workspace->height; 695 box->height = workspace->height;
696} 696}
697
698static void count_tiling_views(struct sway_container *con, void *data) {
699 if (con->view && !container_is_floating_or_child(con)) {
700 size_t *count = data;
701 *count += 1;
702 }
703}
704
705size_t workspace_num_tiling_views(struct sway_workspace *ws) {
706 size_t count = 0;
707 workspace_for_each_container(ws, count_tiling_views, &count);
708 return count;
709}