aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands.c
diff options
context:
space:
mode:
authorLibravatar S. Christoffer Eliesen <christoffer@eliesen.no>2015-10-21 16:34:12 +0200
committerLibravatar S. Christoffer Eliesen <christoffer@eliesen.no>2015-10-21 23:24:06 +0200
commitca862a5bd45ef094d0f0de5a0765224524b74c48 (patch)
treeea2b673e5929de337b7444614b0d976bc07c3460 /sway/commands.c
parentcommands,container: Tweak debug output to better reflect reality. (diff)
downloadsway-ca862a5bd45ef094d0f0de5a0765224524b74c48.tar.gz
sway-ca862a5bd45ef094d0f0de5a0765224524b74c48.tar.zst
sway-ca862a5bd45ef094d0f0de5a0765224524b74c48.zip
config: Apply output config also during config reload.
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