diff options
author | 2018-07-10 20:41:02 +1000 | |
---|---|---|
committer | 2018-07-10 20:41:02 +1000 | |
commit | 56ad148403d77a6defcbd6cd383dd5cde1a44954 (patch) | |
tree | 9dc36287be4bed02c4e98e600f26f48ceff5d8d6 /swaylock | |
parent | Fix titlebar rendering for nested stacked containers (diff) | |
parent | Merge pull request #2228 from emersion/focus-mode-toggle (diff) | |
download | sway-56ad148403d77a6defcbd6cd383dd5cde1a44954.tar.gz sway-56ad148403d77a6defcbd6cd383dd5cde1a44954.tar.zst sway-56ad148403d77a6defcbd6cd383dd5cde1a44954.zip |
Merge branch 'master' into fix-stacked-layout
Diffstat (limited to 'swaylock')
-rw-r--r-- | swaylock/main.c | 20 | ||||
-rw-r--r-- | swaylock/password.c | 6 | ||||
-rw-r--r-- | swaylock/seat.c | 4 |
3 files changed, 15 insertions, 15 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) { | |||
34 | static void daemonize() { | 34 | static 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 | ||
239 | static void handle_xdg_output_name(void *data, struct zxdg_output_v1 *output, | 239 | static 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 | ||
diff --git a/swaylock/password.c b/swaylock/password.c index d844ec98..7c6fd67b 100644 --- a/swaylock/password.c +++ b/swaylock/password.c | |||
@@ -53,15 +53,15 @@ static bool attempt_password(struct swaylock_password *pw) { | |||
53 | // TODO: only call pam_start once. keep the same handle the whole time | 53 | // TODO: only call pam_start once. keep the same handle the whole time |
54 | if ((pam_err = pam_start("swaylock", username, | 54 | if ((pam_err = pam_start("swaylock", username, |
55 | &local_conversation, &local_auth_handle)) != PAM_SUCCESS) { | 55 | &local_conversation, &local_auth_handle)) != PAM_SUCCESS) { |
56 | wlr_log(L_ERROR, "PAM returned error %d", pam_err); | 56 | wlr_log(WLR_ERROR, "PAM returned error %d", pam_err); |
57 | } | 57 | } |
58 | if ((pam_err = pam_authenticate(local_auth_handle, 0)) != PAM_SUCCESS) { | 58 | if ((pam_err = pam_authenticate(local_auth_handle, 0)) != PAM_SUCCESS) { |
59 | wlr_log(L_ERROR, "pam_authenticate failed"); | 59 | wlr_log(WLR_ERROR, "pam_authenticate failed"); |
60 | goto fail; | 60 | goto fail; |
61 | } | 61 | } |
62 | // TODO: only call pam_end once we succeed at authing. refresh tokens beforehand | 62 | // TODO: only call pam_end once we succeed at authing. refresh tokens beforehand |
63 | if ((pam_err = pam_end(local_auth_handle, pam_err)) != PAM_SUCCESS) { | 63 | if ((pam_err = pam_end(local_auth_handle, pam_err)) != PAM_SUCCESS) { |
64 | wlr_log(L_ERROR, "pam_end failed"); | 64 | wlr_log(WLR_ERROR, "pam_end failed"); |
65 | goto fail; | 65 | goto fail; |
66 | } | 66 | } |
67 | clear_password_buffer(pw); | 67 | clear_password_buffer(pw); |
diff --git a/swaylock/seat.c b/swaylock/seat.c index 6c66d220..c2630d87 100644 --- a/swaylock/seat.c +++ b/swaylock/seat.c | |||
@@ -12,13 +12,13 @@ static void keyboard_keymap(void *data, struct wl_keyboard *wl_keyboard, | |||
12 | struct swaylock_state *state = data; | 12 | struct swaylock_state *state = data; |
13 | if (format != WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1) { | 13 | if (format != WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1) { |
14 | close(fd); | 14 | close(fd); |
15 | wlr_log(L_ERROR, "Unknown keymap format %d, aborting", format); | 15 | wlr_log(WLR_ERROR, "Unknown keymap format %d, aborting", format); |
16 | exit(1); | 16 | exit(1); |
17 | } | 17 | } |
18 | char *map_shm = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0); | 18 | char *map_shm = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0); |
19 | if (map_shm == MAP_FAILED) { | 19 | if (map_shm == MAP_FAILED) { |
20 | close(fd); | 20 | close(fd); |
21 | wlr_log(L_ERROR, "Unable to initialize keymap shm, aborting"); | 21 | wlr_log(WLR_ERROR, "Unable to initialize keymap shm, aborting"); |
22 | exit(1); | 22 | exit(1); |
23 | } | 23 | } |
24 | struct xkb_keymap *keymap = xkb_keymap_new_from_string( | 24 | struct xkb_keymap *keymap = xkb_keymap_new_from_string( |