diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-02-05 16:50:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-05 16:50:55 +0100 |
commit | 09c2a46b3d28b447ec070f0d6a57bd47fe1e6fd7 (patch) | |
tree | 00dbf9a7f3a1c81ccc358fb7ef8e2d66fd872b3f | |
parent | Merge pull request #3581 from c-edw/ValidateConfigNoInitialize (diff) | |
parent | Initialize server so input manager is available. (diff) | |
download | sway-09c2a46b3d28b447ec070f0d6a57bd47fe1e6fd7.tar.gz sway-09c2a46b3d28b447ec070f0d6a57bd47fe1e6fd7.tar.zst sway-09c2a46b3d28b447ec070f0d6a57bd47fe1e6fd7.zip |
Merge pull request #3582 from c-edw/FixUninitializedInputManager
Initialize server so input manager is available.
-rw-r--r-- | sway/main.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sway/main.c b/sway/main.c index b3ffdd83..67d0f799 100644 --- a/sway/main.c +++ b/sway/main.c | |||
@@ -318,12 +318,6 @@ int main(int argc, char **argv) { | |||
318 | detect_proprietary(allow_unsupported_gpu); | 318 | detect_proprietary(allow_unsupported_gpu); |
319 | detect_raspi(); | 319 | detect_raspi(); |
320 | 320 | ||
321 | if (validate) { | ||
322 | bool valid = load_main_config(config_path, false, true); | ||
323 | free(config_path); | ||
324 | return valid ? 0 : 1; | ||
325 | } | ||
326 | |||
327 | if (optind < argc) { // Behave as IPC client | 321 | if (optind < argc) { // Behave as IPC client |
328 | if (optind != 1) { | 322 | if (optind != 1) { |
329 | sway_log(SWAY_ERROR, "Don't use options with the IPC client"); | 323 | sway_log(SWAY_ERROR, "Don't use options with the IPC client"); |
@@ -365,6 +359,12 @@ int main(int argc, char **argv) { | |||
365 | return 1; | 359 | return 1; |
366 | } | 360 | } |
367 | 361 | ||
362 | if (validate) { | ||
363 | bool valid = load_main_config(config_path, false, true); | ||
364 | free(config_path); | ||
365 | return valid ? 0 : 1; | ||
366 | } | ||
367 | |||
368 | ipc_init(&server); | 368 | ipc_init(&server); |
369 | 369 | ||
370 | setenv("WAYLAND_DISPLAY", server.socket, true); | 370 | setenv("WAYLAND_DISPLAY", server.socket, true); |