aboutsummaryrefslogtreecommitdiffstats
path: root/swaylock/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'swaylock/main.c')
-rw-r--r--swaylock/main.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/swaylock/main.c b/swaylock/main.c
index 73c2b5d6..68d67a10 100644
--- a/swaylock/main.c
+++ b/swaylock/main.c
@@ -34,7 +34,7 @@ void sway_terminate(int exit_code) {
34static void daemonize() { 34static void daemonize() {
35 int fds[2]; 35 int fds[2];
36 if (pipe(fds) != 0) { 36 if (pipe(fds) != 0) {
37 wlr_log(L_ERROR, "Failed to pipe"); 37 wlr_log(WLR_ERROR, "Failed to pipe");
38 exit(1); 38 exit(1);
39 } 39 }
40 if (fork() == 0) { 40 if (fork() == 0) {
@@ -58,7 +58,7 @@ static void daemonize() {
58 close(fds[1]); 58 close(fds[1]);
59 uint8_t success; 59 uint8_t success;
60 if (read(fds[0], &success, 1) != 1 || !success) { 60 if (read(fds[0], &success, 1) != 1 || !success) {
61 wlr_log(L_ERROR, "Failed to daemonize"); 61 wlr_log(WLR_ERROR, "Failed to daemonize");
62 exit(1); 62 exit(1);
63 } 63 }
64 close(fds[0]); 64 close(fds[0]);
@@ -238,7 +238,7 @@ static void handle_xdg_output_logical_position(void *data,
238 238
239static void handle_xdg_output_name(void *data, struct zxdg_output_v1 *output, 239static void handle_xdg_output_name(void *data, struct zxdg_output_v1 *output,
240 const char *name) { 240 const char *name) {
241 wlr_log(L_DEBUG, "output name is %s", name); 241 wlr_log(WLR_DEBUG, "output name is %s", name);
242 struct swaylock_surface *surface = data; 242 struct swaylock_surface *surface = data;
243 surface->xdg_output = output; 243 surface->xdg_output = output;
244 surface->output_name = strdup(name); 244 surface->output_name = strdup(name);
@@ -354,10 +354,10 @@ static void load_image(char *arg, struct swaylock_state *state) {
354 } 354 }
355 if (exists) { 355 if (exists) {
356 if (image->output_name) { 356 if (image->output_name) {
357 wlr_log(L_ERROR, "Multiple images defined for output %s", 357 wlr_log(WLR_ERROR, "Multiple images defined for output %s",
358 image->output_name); 358 image->output_name);
359 } else { 359 } else {
360 wlr_log(L_ERROR, "Multiple default images defined"); 360 wlr_log(WLR_ERROR, "Multiple default images defined");
361 } 361 }
362 } 362 }
363 363
@@ -377,7 +377,7 @@ static void load_image(char *arg, struct swaylock_state *state) {
377 } 377 }
378 wl_list_insert(&state->images, &image->link); 378 wl_list_insert(&state->images, &image->link);
379 state->args.mode = BACKGROUND_MODE_FILL; 379 state->args.mode = BACKGROUND_MODE_FILL;
380 wlr_log(L_DEBUG, "Loaded image %s for output %s", 380 wlr_log(WLR_DEBUG, "Loaded image %s for output %s",
381 image->path, image->output_name ? image->output_name : "*"); 381 image->path, image->output_name ? image->output_name : "*");
382} 382}
383 383
@@ -416,7 +416,7 @@ int main(int argc, char **argv) {
416 }; 416 };
417 wl_list_init(&state.images); 417 wl_list_init(&state.images);
418 418
419 wlr_log_init(L_DEBUG, NULL); 419 wlr_log_init(WLR_DEBUG, NULL);
420 420
421 int c; 421 int c;
422 while (1) { 422 while (1) {
@@ -480,13 +480,13 @@ int main(int argc, char **argv) {
480 wl_display_roundtrip(state.display); 480 wl_display_roundtrip(state.display);
481 assert(state.compositor && state.layer_shell && state.shm); 481 assert(state.compositor && state.layer_shell && state.shm);
482 if (!state.input_inhibit_manager) { 482 if (!state.input_inhibit_manager) {
483 wlr_log(L_ERROR, "Compositor does not support the input inhibitor " 483 wlr_log(WLR_ERROR, "Compositor does not support the input inhibitor "
484 "protocol, refusing to run insecurely"); 484 "protocol, refusing to run insecurely");
485 return 1; 485 return 1;
486 } 486 }
487 487
488 if (wl_list_empty(&state.surfaces)) { 488 if (wl_list_empty(&state.surfaces)) {
489 wlr_log(L_DEBUG, "Exiting - no outputs to show on."); 489 wlr_log(WLR_DEBUG, "Exiting - no outputs to show on.");
490 return 0; 490 return 0;
491 } 491 }
492 492
@@ -502,7 +502,7 @@ int main(int argc, char **argv) {
502 } 502 }
503 wl_display_roundtrip(state.display); 503 wl_display_roundtrip(state.display);
504 } else { 504 } else {
505 wlr_log(L_INFO, "Compositor does not support zxdg output manager, " 505 wlr_log(WLR_INFO, "Compositor does not support zxdg output manager, "
506 "images assigned to named outputs will not work"); 506 "images assigned to named outputs will not work");
507 } 507 }
508 508