diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-11-28 14:39:46 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-11-28 14:39:46 -0500 |
commit | 01617131f110a3a80987706ff6e86c46f2269255 (patch) | |
tree | 38969a7241aabcd2750117929ace19d2f3d5b1c0 | |
parent | Allow output config for output named * (diff) | |
parent | sway/main: Move wlc init to after args are handled. (diff) | |
download | sway-01617131f110a3a80987706ff6e86c46f2269255.tar.gz sway-01617131f110a3a80987706ff6e86c46f2269255.tar.zst sway-01617131f110a3a80987706ff6e86c46f2269255.zip |
Merge pull request #271 from sce/move_wlc_init
sway/main: Move wlc init to after args are handled.
-rw-r--r-- | sway/main.c | 26 |
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) { |