aboutsummaryrefslogtreecommitdiff
path: root/sway/main.c
diff options
context:
space:
mode:
authorRyan Dwyer <RyanDwyer@users.noreply.github.com>2018-08-04 10:15:29 +1000
committerGitHub <noreply@github.com>2018-08-04 10:15:29 +1000
commite24fc3df18182f3b78cdf90322b0acabfb82a60e (patch)
tree27a696a801539c946ac597e20b920c4b29697204 /sway/main.c
parentad2a7c26180dcb1ab0d2d128e207921152762ed6 (diff)
parent38675eba7be471a2dacb5928f54d046297c23517 (diff)
Merge branch 'master' into fix-2416
Diffstat (limited to 'sway/main.c')
-rw-r--r--sway/main.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sway/main.c b/sway/main.c
index 477ffa5a..c02caf42 100644
--- a/sway/main.c
+++ b/sway/main.c
@@ -22,6 +22,7 @@
#include "sway/debug.h"
#include "sway/desktop/transaction.h"
#include "sway/server.h"
+#include "sway/swaynag.h"
#include "sway/tree/layout.h"
#include "sway/ipc-server.h"
#include "ipc-client.h"
@@ -416,11 +417,12 @@ int main(int argc, char **argv) {
log_env();
if (validate) {
- bool valid = load_main_config(config_path, false);
+ bool valid = load_main_config(config_path, false, true);
return valid ? 0 : 1;
}
- if (!load_main_config(config_path, false)) {
+ setenv("WAYLAND_DISPLAY", server.socket, true);
+ if (!load_main_config(config_path, false, false)) {
sway_terminate(EXIT_FAILURE);
}
@@ -430,7 +432,6 @@ int main(int argc, char **argv) {
security_sanity_check();
- setenv("WAYLAND_DISPLAY", server.socket, true);
if (!terminate_request) {
if (!server_start_backend(&server)) {
sway_terminate(EXIT_FAILURE);
@@ -452,6 +453,10 @@ int main(int argc, char **argv) {
}
transaction_commit_dirty();
+ if (config->swaynag_config_errors.pid > 0) {
+ swaynag_show(&config->swaynag_config_errors);
+ }
+
if (!terminate_request) {
server_run(&server);
}