aboutsummaryrefslogtreecommitdiffstats
path: root/sway/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/main.c')
-rw-r--r--sway/main.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/sway/main.c b/sway/main.c
index 19648782..dd609214 100644
--- a/sway/main.c
+++ b/sway/main.c
@@ -64,21 +64,7 @@ int main(int argc, char **argv) {
64 {0, 0, 0, 0} 64 {0, 0, 0, 0}
65 }; 65 };
66 66
67 setenv("WLC_DIM", "0", 0);
68
69 wlc_log_set_handler(wlc_log_handler);
70
71 detect_nvidia();
72
73 /* Changing code earlier than this point requires detailed review */
74 if (!wlc_init(&interface, argc, argv)) {
75 return 1;
76 }
77
78 register_extensions();
79
80 char *config_path = NULL; 67 char *config_path = NULL;
81
82 int c; 68 int c;
83 while (1) { 69 while (1) {
84 int option_index = 0; 70 int option_index = 0;
@@ -121,6 +107,18 @@ int main(int argc, char **argv) {
121 } 107 }
122 } 108 }
123 109
110 setenv("WLC_DIM", "0", 0);
111 wlc_log_set_handler(wlc_log_handler);
112 detect_nvidia();
113
114 /* Changing code earlier than this point requires detailed review */
115 /* (That code runs as root on systems without logind, and wlc_init drops to
116 * another user.) */
117 if (!wlc_init(&interface, argc, argv)) {
118 return 1;
119 }
120 register_extensions();
121
124 if (debug) { 122 if (debug) {
125 init_log(L_DEBUG); 123 init_log(L_DEBUG);
126 } else if (verbose || validate) { 124 } else if (verbose || validate) {