aboutsummaryrefslogtreecommitdiffstats
path: root/swaylock/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'swaylock/main.c')
-rw-r--r--swaylock/main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/swaylock/main.c b/swaylock/main.c
index c25c8eec..ed8c5607 100644
--- a/swaylock/main.c
+++ b/swaylock/main.c
@@ -32,7 +32,7 @@ void sway_terminate(int exit_code) {
32 exit(exit_code); 32 exit(exit_code);
33} 33}
34 34
35static void daemonize() { 35static void daemonize(void) {
36 int fds[2]; 36 int fds[2];
37 if (pipe(fds) != 0) { 37 if (pipe(fds) != 0) {
38 wlr_log(WLR_ERROR, "Failed to pipe"); 38 wlr_log(WLR_ERROR, "Failed to pipe");
@@ -845,6 +845,9 @@ static int load_config(char *path, struct swaylock_state *state,
845static struct swaylock_state state; 845static struct swaylock_state state;
846 846
847int main(int argc, char **argv) { 847int main(int argc, char **argv) {
848 wlr_log_init(WLR_DEBUG, NULL);
849 initialize_pw_backend();
850
848 enum line_mode line_mode = LM_LINE; 851 enum line_mode line_mode = LM_LINE;
849 state.args = (struct swaylock_args){ 852 state.args = (struct swaylock_args){
850 .mode = BACKGROUND_MODE_SOLID_COLOR, 853 .mode = BACKGROUND_MODE_SOLID_COLOR,
@@ -857,8 +860,6 @@ int main(int argc, char **argv) {
857 wl_list_init(&state.images); 860 wl_list_init(&state.images);
858 set_default_colors(&state.args.colors); 861 set_default_colors(&state.args.colors);
859 862
860 wlr_log_init(WLR_DEBUG, NULL);
861
862 char *config_path = NULL; 863 char *config_path = NULL;
863 int result = parse_options(argc, argv, NULL, NULL, &config_path); 864 int result = parse_options(argc, argv, NULL, NULL, &config_path);
864 if (result != 0) { 865 if (result != 0) {