diff options
author | emersion <contact@emersion.fr> | 2018-04-02 15:30:58 -0400 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-04-02 15:30:58 -0400 |
commit | a4a241697ae591289d7c14eff972e1ef787216e2 (patch) | |
tree | d82d3c3eba2946670aa634a62d03feb7102f0bf8 /sway/tree/output.c | |
parent | Xwayland unmanaged views aren't views anymore (diff) | |
parent | Merge pull request #1699 from acrisci/seat-fixes (diff) | |
download | sway-a4a241697ae591289d7c14eff972e1ef787216e2.tar.gz sway-a4a241697ae591289d7c14eff972e1ef787216e2.tar.zst sway-a4a241697ae591289d7c14eff972e1ef787216e2.zip |
Merge branch 'wlroots' into view-redesign
Diffstat (limited to 'sway/tree/output.c')
-rw-r--r-- | sway/tree/output.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sway/tree/output.c b/sway/tree/output.c index 80a36ac7..0509db23 100644 --- a/sway/tree/output.c +++ b/sway/tree/output.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #include <strings.h> | ||
1 | #include "sway/tree/container.h" | 2 | #include "sway/tree/container.h" |
2 | #include "sway/tree/layout.h" | 3 | #include "sway/tree/layout.h" |
3 | #include "sway/output.h" | 4 | #include "sway/output.h" |
@@ -38,3 +39,13 @@ struct sway_container *container_output_destroy(struct sway_container *output) { | |||
38 | container_destroy(output); | 39 | container_destroy(output); |
39 | return &root_container; | 40 | return &root_container; |
40 | } | 41 | } |
42 | |||
43 | struct sway_container *output_by_name(const char *name) { | ||
44 | for (int i = 0; i < root_container.children->length; ++i) { | ||
45 | struct sway_container *output = root_container.children->items[i]; | ||
46 | if (strcasecmp(output->name, name) == 0){ | ||
47 | return output; | ||
48 | } | ||
49 | } | ||
50 | return NULL; | ||
51 | } | ||