mirror of
https://github.com/swaywm/sway.git
synced 2026-07-05 00:06:04 -04:00
Merge 7faee6637f into 3ee286d7f7
This commit is contained in:
commit
aded0015df
91 changed files with 593 additions and 462 deletions
|
|
@ -14,7 +14,6 @@
|
|||
#include <unistd.h>
|
||||
#include <wayland-client.h>
|
||||
#include <wordexp.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "swaylock/seat.h"
|
||||
#include "swaylock/swaylock.h"
|
||||
#include "background-image.h"
|
||||
|
|
@ -34,7 +33,7 @@ void sway_terminate(int exit_code) {
|
|||
static void daemonize() {
|
||||
int fds[2];
|
||||
if (pipe(fds) != 0) {
|
||||
wlr_log(L_ERROR, "Failed to pipe");
|
||||
sway_log(L_ERROR, "Failed to pipe");
|
||||
exit(1);
|
||||
}
|
||||
if (fork() == 0) {
|
||||
|
|
@ -56,7 +55,7 @@ static void daemonize() {
|
|||
close(fds[1]);
|
||||
uint8_t success;
|
||||
if (read(fds[0], &success, 1) != 1 || !success) {
|
||||
wlr_log(L_ERROR, "Failed to daemonize");
|
||||
sway_log(L_ERROR, "Failed to daemonize");
|
||||
exit(1);
|
||||
}
|
||||
close(fds[0]);
|
||||
|
|
@ -218,7 +217,7 @@ static void handle_xdg_output_logical_position(void *data,
|
|||
|
||||
static void handle_xdg_output_name(void *data, struct zxdg_output_v1 *output,
|
||||
const char *name) {
|
||||
wlr_log(L_DEBUG, "output name is %s", name);
|
||||
sway_log(L_DEBUG, "output name is %s", name);
|
||||
struct swaylock_surface *surface = data;
|
||||
surface->xdg_output = output;
|
||||
surface->output_name = strdup(name);
|
||||
|
|
@ -334,10 +333,10 @@ static void load_image(char *arg, struct swaylock_state *state) {
|
|||
}
|
||||
if (exists) {
|
||||
if (image->output_name) {
|
||||
wlr_log(L_ERROR, "Multiple images defined for output %s",
|
||||
sway_log(L_ERROR, "Multiple images defined for output %s",
|
||||
image->output_name);
|
||||
} else {
|
||||
wlr_log(L_ERROR, "Multiple default images defined");
|
||||
sway_log(L_ERROR, "Multiple default images defined");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -357,7 +356,7 @@ static void load_image(char *arg, struct swaylock_state *state) {
|
|||
}
|
||||
wl_list_insert(&state->images, &image->link);
|
||||
state->args.mode = BACKGROUND_MODE_FILL;
|
||||
wlr_log(L_DEBUG, "Loaded image %s for output %s",
|
||||
sway_log(L_DEBUG, "Loaded image %s for output %s",
|
||||
image->path, image->output_name ? image->output_name : "*");
|
||||
}
|
||||
|
||||
|
|
@ -396,7 +395,7 @@ int main(int argc, char **argv) {
|
|||
};
|
||||
wl_list_init(&state.images);
|
||||
|
||||
wlr_log_init(L_DEBUG, NULL);
|
||||
sway_log_init(L_DEBUG, NULL);
|
||||
|
||||
int c;
|
||||
while (1) {
|
||||
|
|
@ -460,13 +459,13 @@ int main(int argc, char **argv) {
|
|||
wl_display_roundtrip(state.display);
|
||||
assert(state.compositor && state.layer_shell && state.shm);
|
||||
if (!state.input_inhibit_manager) {
|
||||
wlr_log(L_ERROR, "Compositor does not support the input inhibitor "
|
||||
sway_log(L_ERROR, "Compositor does not support the input inhibitor "
|
||||
"protocol, refusing to run insecurely");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (wl_list_empty(&state.surfaces)) {
|
||||
wlr_log(L_DEBUG, "Exiting - no outputs to show on.");
|
||||
sway_log(L_DEBUG, "Exiting - no outputs to show on.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -482,7 +481,7 @@ int main(int argc, char **argv) {
|
|||
}
|
||||
wl_display_roundtrip(state.display);
|
||||
} else {
|
||||
wlr_log(L_INFO, "Compositor does not support zxdg output manager, "
|
||||
sway_log(L_INFO, "Compositor does not support zxdg output manager, "
|
||||
"images assigned to named outputs will not work");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue