diff options
Diffstat (limited to 'sway/tree/output.c')
-rw-r--r-- | sway/tree/output.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sway/tree/output.c b/sway/tree/output.c index 7248fd00..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" |
@@ -29,6 +30,7 @@ struct sway_container *container_output_destroy(struct sway_container *output) { | |||
29 | wl_list_remove(&output->sway_output->destroy.link); | 30 | wl_list_remove(&output->sway_output->destroy.link); |
30 | wl_list_remove(&output->sway_output->mode.link); | 31 | wl_list_remove(&output->sway_output->mode.link); |
31 | wl_list_remove(&output->sway_output->transform.link); | 32 | wl_list_remove(&output->sway_output->transform.link); |
33 | wl_list_remove(&output->sway_output->scale.link); | ||
32 | 34 | ||
33 | wl_list_remove(&output->sway_output->damage_destroy.link); | 35 | wl_list_remove(&output->sway_output->damage_destroy.link); |
34 | wl_list_remove(&output->sway_output->damage_frame.link); | 36 | wl_list_remove(&output->sway_output->damage_frame.link); |
@@ -37,3 +39,13 @@ struct sway_container *container_output_destroy(struct sway_container *output) { | |||
37 | container_destroy(output); | 39 | container_destroy(output); |
38 | return &root_container; | 40 | return &root_container; |
39 | } | 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 | } | ||