diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-08-26 10:50:02 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-26 10:50:02 -0400 |
commit | 10c2c09cf67021e0e3a3cb4e733841fed1f8eaa9 (patch) | |
tree | a78b580f6fe08dda7a94633e47c31c717e190c9c | |
parent | Merge pull request #2515 from RyanDwyer/remove-layout-file (diff) | |
parent | Add comment for sway_root.all_outputs (diff) | |
download | sway-10c2c09cf67021e0e3a3cb4e733841fed1f8eaa9.tar.gz sway-10c2c09cf67021e0e3a3cb4e733841fed1f8eaa9.tar.zst sway-10c2c09cf67021e0e3a3cb4e733841fed1f8eaa9.zip |
Merge pull request #2513 from RyanDwyer/rename-root-outputs
Rename sway_root.outputs to sway_root.all_outputs
-rw-r--r-- | include/sway/tree/root.h | 3 | ||||
-rw-r--r-- | sway/config/output.c | 6 | ||||
-rw-r--r-- | sway/desktop/output.c | 2 | ||||
-rw-r--r-- | sway/ipc-server.c | 2 | ||||
-rw-r--r-- | sway/tree/root.c | 2 |
5 files changed, 9 insertions, 6 deletions
diff --git a/include/sway/tree/root.h b/include/sway/tree/root.h index ee4bd836..ec6516c9 100644 --- a/include/sway/tree/root.h +++ b/include/sway/tree/root.h | |||
@@ -21,7 +21,8 @@ struct sway_root { | |||
21 | 21 | ||
22 | struct wlr_texture *debug_tree; | 22 | struct wlr_texture *debug_tree; |
23 | 23 | ||
24 | struct wl_list outputs; // sway_output::link | 24 | // Includes disabled outputs |
25 | struct wl_list all_outputs; // sway_output::link | ||
25 | 26 | ||
26 | list_t *scratchpad; // struct sway_container | 27 | list_t *scratchpad; // struct sway_container |
27 | list_t *saved_workspaces; // For when there's no connected outputs | 28 | list_t *saved_workspaces; // For when there's no connected outputs |
diff --git a/sway/config/output.c b/sway/config/output.c index 199267bf..16ec9339 100644 --- a/sway/config/output.c +++ b/sway/config/output.c | |||
@@ -289,7 +289,8 @@ void apply_output_config_to_outputs(struct output_config *oc) { | |||
289 | bool wildcard = strcmp(oc->name, "*") == 0; | 289 | bool wildcard = strcmp(oc->name, "*") == 0; |
290 | char id[128]; | 290 | char id[128]; |
291 | struct sway_output *sway_output; | 291 | struct sway_output *sway_output; |
292 | wl_list_for_each(sway_output, &root_container.sway_root->outputs, link) { | 292 | wl_list_for_each(sway_output, |
293 | &root_container.sway_root->all_outputs, link) { | ||
293 | char *name = sway_output->wlr_output->name; | 294 | char *name = sway_output->wlr_output->name; |
294 | output_get_identifier(id, sizeof(id), sway_output); | 295 | output_get_identifier(id, sizeof(id), sway_output); |
295 | if (wildcard || !strcmp(name, oc->name) || !strcmp(id, oc->name)) { | 296 | if (wildcard || !strcmp(name, oc->name) || !strcmp(id, oc->name)) { |
@@ -349,7 +350,8 @@ static void default_output_config(struct output_config *oc, | |||
349 | 350 | ||
350 | void create_default_output_configs(void) { | 351 | void create_default_output_configs(void) { |
351 | struct sway_output *sway_output; | 352 | struct sway_output *sway_output; |
352 | wl_list_for_each(sway_output, &root_container.sway_root->outputs, link) { | 353 | wl_list_for_each(sway_output, |
354 | &root_container.sway_root->all_outputs, link) { | ||
353 | char *name = sway_output->wlr_output->name; | 355 | char *name = sway_output->wlr_output->name; |
354 | struct output_config *oc = new_output_config(name); | 356 | struct output_config *oc = new_output_config(name); |
355 | default_output_config(oc, sway_output->wlr_output); | 357 | default_output_config(oc, sway_output->wlr_output); |
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 35fce1a6..bbebe453 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -556,7 +556,7 @@ void handle_new_output(struct wl_listener *listener, void *data) { | |||
556 | wl_signal_add(&wlr_output->events.destroy, &output->destroy); | 556 | wl_signal_add(&wlr_output->events.destroy, &output->destroy); |
557 | output->destroy.notify = handle_destroy; | 557 | output->destroy.notify = handle_destroy; |
558 | 558 | ||
559 | wl_list_insert(&root_container.sway_root->outputs, &output->link); | 559 | wl_list_insert(&root_container.sway_root->all_outputs, &output->link); |
560 | 560 | ||
561 | if (!wl_list_empty(&wlr_output->modes)) { | 561 | if (!wl_list_empty(&wlr_output->modes)) { |
562 | struct wlr_output_mode *mode = | 562 | struct wlr_output_mode *mode = |
diff --git a/sway/ipc-server.c b/sway/ipc-server.c index 1ac0521e..ed710be5 100644 --- a/sway/ipc-server.c +++ b/sway/ipc-server.c | |||
@@ -616,7 +616,7 @@ void ipc_client_handle_command(struct ipc_client *client) { | |||
616 | } | 616 | } |
617 | } | 617 | } |
618 | struct sway_output *output; | 618 | struct sway_output *output; |
619 | wl_list_for_each(output, &root_container.sway_root->outputs, link) { | 619 | wl_list_for_each(output, &root_container.sway_root->all_outputs, link) { |
620 | if (!output->swayc) { | 620 | if (!output->swayc) { |
621 | json_object_array_add(outputs, | 621 | json_object_array_add(outputs, |
622 | ipc_json_describe_disabled_output(output)); | 622 | ipc_json_describe_disabled_output(output)); |
diff --git a/sway/tree/root.c b/sway/tree/root.c index 5602f0a0..2dd8f9f2 100644 --- a/sway/tree/root.c +++ b/sway/tree/root.c | |||
@@ -32,7 +32,7 @@ void root_create(void) { | |||
32 | 32 | ||
33 | root_container.sway_root = calloc(1, sizeof(*root_container.sway_root)); | 33 | root_container.sway_root = calloc(1, sizeof(*root_container.sway_root)); |
34 | root_container.sway_root->output_layout = wlr_output_layout_create(); | 34 | root_container.sway_root->output_layout = wlr_output_layout_create(); |
35 | wl_list_init(&root_container.sway_root->outputs); | 35 | wl_list_init(&root_container.sway_root->all_outputs); |
36 | #ifdef HAVE_XWAYLAND | 36 | #ifdef HAVE_XWAYLAND |
37 | wl_list_init(&root_container.sway_root->xwayland_unmanaged); | 37 | wl_list_init(&root_container.sway_root->xwayland_unmanaged); |
38 | #endif | 38 | #endif |