diff options
author | emersion <[email protected]> | 2018-07-19 16:14:25 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2018-07-19 16:14:25 +0100 |
commit | d8badceb546483a675133235536afcdb897c0e9c (patch) | |
tree | 9179266f0683c1931b9d5274fbeebe23f420186a /sway/main.c | |
parent | 3a13455b4e23990bb8cdc96f231ab7a78c2d98df (diff) | |
parent | ec652866060a178796d6dbb32bf7f0e2101e56c9 (diff) |
Merge pull request #2304 from RedSoxFan/fix-2298
Fix deferred command handling
Diffstat (limited to 'sway/main.c')
-rw-r--r-- | sway/main.c | 9 |
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); |