aboutsummaryrefslogtreecommitdiffstats
path: root/sway/main.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-07-19 01:39:58 -0400
committerLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-07-19 01:39:58 -0400
commitec652866060a178796d6dbb32bf7f0e2101e56c9 (patch)
tree7e30314466a00931c26899d28763c809cb790ef2 /sway/main.c
parentMerge pull request #2300 from emersion/override-redirect-updates (diff)
downloadsway-ec652866060a178796d6dbb32bf7f0e2101e56c9.tar.gz
sway-ec652866060a178796d6dbb32bf7f0e2101e56c9.tar.zst
sway-ec652866060a178796d6dbb32bf7f0e2101e56c9.zip
Fix deferred command handling
Diffstat (limited to 'sway/main.c')
-rw-r--r--sway/main.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sway/main.c b/sway/main.c
index 1a55b519..a20f1dac 100644
--- a/sway/main.c
+++ b/sway/main.c
@@ -429,9 +429,16 @@ int main(int argc, char **argv) {
429 429
430 security_sanity_check(); 430 security_sanity_check();
431 431
432 config->active = true;
433 setenv("WAYLAND_DISPLAY", server.socket, true); 432 setenv("WAYLAND_DISPLAY", server.socket, true);
433 if (!terminate_request) {
434 if (!server_start_backend(&server)) {
435 sway_terminate(EXIT_FAILURE);
436 }
437 }
438
439 config->active = true;
434 // Execute commands until there are none left 440 // Execute commands until there are none left
441 wlr_log(WLR_DEBUG, "Running deferred commands");
435 while (config->cmd_queue->length) { 442 while (config->cmd_queue->length) {
436 char *line = config->cmd_queue->items[0]; 443 char *line = config->cmd_queue->items[0];
437 struct cmd_results *res = execute_command(line, NULL); 444 struct cmd_results *res = execute_command(line, NULL);