diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-11-18 11:22:02 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2017-11-18 11:22:02 -0500 |
commit | 733993a651c71f7e2198d505960d6bbd31e0e107 (patch) | |
tree | e51732c5872b624e73355f9e5b3f762101f3cd0d /sway/main.c | |
parent | Initial (awful) pass on xdg shell support (diff) | |
download | sway-733993a651c71f7e2198d505960d6bbd31e0e107.tar.gz sway-733993a651c71f7e2198d505960d6bbd31e0e107.tar.zst sway-733993a651c71f7e2198d505960d6bbd31e0e107.zip |
Move everything to sway/old/
Diffstat (limited to 'sway/main.c')
-rw-r--r-- | sway/main.c | 48 |
1 files changed, 21 insertions, 27 deletions
diff --git a/sway/main.c b/sway/main.c index 7d6f2873..5710a099 100644 --- a/sway/main.c +++ b/sway/main.c | |||
@@ -1,30 +1,24 @@ | |||
1 | #define _XOPEN_SOURCE 700 | 1 | #define _XOPEN_SOURCE 700 |
2 | #define _POSIX_C_SOURCE 200112L | 2 | #define _POSIX_C_SOURCE 200112L |
3 | #include <stdio.h> | 3 | #include <getopt.h> |
4 | #include <stdlib.h> | 4 | #include <signal.h> |
5 | #include <stdbool.h> | 5 | #include <stdbool.h> |
6 | #include <sys/wait.h> | 6 | #include <stdlib.h> |
7 | #include <sys/types.h> | 7 | #include <stdio.h> |
8 | #include <string.h> | ||
8 | #include <sys/stat.h> | 9 | #include <sys/stat.h> |
10 | #include <sys/types.h> | ||
11 | #include <sys/wait.h> | ||
9 | #include <sys/un.h> | 12 | #include <sys/un.h> |
10 | #include <signal.h> | ||
11 | #include <unistd.h> | 13 | #include <unistd.h> |
12 | #include <getopt.h> | ||
13 | #ifdef __linux__ | 14 | #ifdef __linux__ |
14 | #include <sys/capability.h> | 15 | #include <sys/capability.h> |
15 | #include <sys/prctl.h> | 16 | #include <sys/prctl.h> |
16 | #endif | 17 | #endif |
17 | #include "sway/layout.h" | ||
18 | #include "sway/config.h" | ||
19 | #include "sway/security.h" | ||
20 | #include "sway/handlers.h" | ||
21 | #include "sway/input.h" | ||
22 | #include "sway/ipc-server.h" | ||
23 | #include "sway/server.h" | 18 | #include "sway/server.h" |
24 | #include "ipc-client.h" | 19 | #include "ipc-client.h" |
25 | #include "readline.h" | 20 | #include "readline.h" |
26 | #include "stringop.h" | 21 | #include "stringop.h" |
27 | #include "sway.h" | ||
28 | #include "log.h" | 22 | #include "log.h" |
29 | #include "util.h" | 23 | #include "util.h" |
30 | 24 | ||
@@ -39,7 +33,7 @@ void sway_terminate(int exit_code) { | |||
39 | } | 33 | } |
40 | 34 | ||
41 | void sig_handler(int signal) { | 35 | void sig_handler(int signal) { |
42 | close_views(&root_container); | 36 | //close_views(&root_container); |
43 | sway_terminate(EXIT_SUCCESS); | 37 | sway_terminate(EXIT_SUCCESS); |
44 | } | 38 | } |
45 | 39 | ||
@@ -442,17 +436,17 @@ int main(int argc, char **argv) { | |||
442 | return 1; | 436 | return 1; |
443 | } | 437 | } |
444 | 438 | ||
445 | init_layout(); | 439 | //init_layout(); |
446 | ipc_init(); | 440 | //ipc_init(); |
447 | 441 | ||
448 | if (validate) { | 442 | //if (validate) { |
449 | bool valid = load_main_config(config_path, false); | 443 | // bool valid = load_main_config(config_path, false); |
450 | return valid ? 0 : 1; | 444 | // return valid ? 0 : 1; |
451 | } | 445 | //} |
452 | 446 | ||
453 | if (!load_main_config(config_path, false)) { | 447 | //if (!load_main_config(config_path, false)) { |
454 | sway_terminate(EXIT_FAILURE); | 448 | // sway_terminate(EXIT_FAILURE); |
455 | } | 449 | //} |
456 | 450 | ||
457 | if (config_path) { | 451 | if (config_path) { |
458 | free(config_path); | 452 | free(config_path); |
@@ -466,11 +460,11 @@ int main(int argc, char **argv) { | |||
466 | 460 | ||
467 | server_fini(&server); | 461 | server_fini(&server); |
468 | 462 | ||
469 | ipc_terminate(); | 463 | //ipc_terminate(); |
470 | 464 | ||
471 | if (config) { | 465 | //if (config) { |
472 | free_config(config); | 466 | // free_config(config); |
473 | } | 467 | //} |
474 | 468 | ||
475 | return exit_value; | 469 | return exit_value; |
476 | } | 470 | } |