diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-01-20 16:21:45 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-01-20 16:21:45 -0500 |
commit | 6a1d71b8b8f33bdea3fb41bcd0de9439c0452682 (patch) | |
tree | 3ebbb611bb34864f9e86ceed87b6e32c73b93f84 /sway/tree | |
parent | add kill command (diff) | |
download | sway-6a1d71b8b8f33bdea3fb41bcd0de9439c0452682.tar.gz sway-6a1d71b8b8f33bdea3fb41bcd0de9439c0452682.tar.zst sway-6a1d71b8b8f33bdea3fb41bcd0de9439c0452682.zip |
basic command criteria
Diffstat (limited to 'sway/tree')
-rw-r--r-- | sway/tree/container.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index d241f69a..e224539f 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -321,3 +321,25 @@ swayc_t *swayc_at(swayc_t *parent, double lx, double ly, | |||
321 | 321 | ||
322 | return NULL; | 322 | return NULL; |
323 | } | 323 | } |
324 | |||
325 | void container_map(swayc_t *container, void (*f)(swayc_t *view, void *data), void *data) { | ||
326 | if (container) { | ||
327 | int i; | ||
328 | if (container->children) { | ||
329 | for (i = 0; i < container->children->length; ++i) { | ||
330 | swayc_t *child = container->children->items[i]; | ||
331 | container_map(child, f, data); | ||
332 | } | ||
333 | } | ||
334 | // TODO | ||
335 | /* | ||
336 | if (container->floating) { | ||
337 | for (i = 0; i < container->floating->length; ++i) { | ||
338 | swayc_t *child = container->floating->items[i]; | ||
339 | container_map(child, f, data); | ||
340 | } | ||
341 | } | ||
342 | */ | ||
343 | f(container, data); | ||
344 | } | ||
345 | } | ||