summaryrefslogtreecommitdiff
path: root/sway/main.c
diff options
context:
space:
mode:
authorBrian Ashworth <[email protected]>2018-07-19 01:39:58 -0400
committerBrian Ashworth <[email protected]>2018-07-19 01:39:58 -0400
commitec652866060a178796d6dbb32bf7f0e2101e56c9 (patch)
tree7e30314466a00931c26899d28763c809cb790ef2 /sway/main.c
parent4931d0ddc5d9de1f823af7efd931702b2fa80260 (diff)
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) {
security_sanity_check();
- config->active = true;
setenv("WAYLAND_DISPLAY", server.socket, true);
+ if (!terminate_request) {
+ if (!server_start_backend(&server)) {
+ sway_terminate(EXIT_FAILURE);
+ }
+ }
+
+ config->active = true;
// Execute commands until there are none left
+ wlr_log(WLR_DEBUG, "Running deferred commands");
while (config->cmd_queue->length) {
char *line = config->cmd_queue->items[0];
struct cmd_results *res = execute_command(line, NULL);