summaryrefslogtreecommitdiffstats
path: root/sway/commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 7b026fd2..9eb0928e 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -622,6 +622,20 @@ static enum cmd_status cmd_output(int argc, char **argv) {
622 sway_log(L_DEBUG, "Config stored for output %s (%d x %d @ %d, %d)", 622 sway_log(L_DEBUG, "Config stored for output %s (%d x %d @ %d, %d)",
623 output->name, output->width, output->height, output->x, output->y); 623 output->name, output->width, output->height, output->x, output->y);
624 624
625 if (output->name) {
626 // Try to find the output container and apply configuration now. If
627 // this is during startup then there will be no container and config
628 // will be applied during normal "new output" event from wlc.
629 swayc_t *cont = NULL;
630 for (int i = 0; i < root_container.children->length; ++i) {
631 cont = root_container.children->items[i];
632 if (cont->name && strcmp(cont->name, output->name) == 0) {
633 apply_output_config(output, cont);
634 break;
635 }
636 }
637 }
638
625 return CMD_SUCCESS; 639 return CMD_SUCCESS;
626} 640}
627 641