sway: change all sway_log to wlr_log

This commit is contained in:
Dominique Martinet 2018-01-05 22:32:51 +01:00
parent fdc92e7454
commit 67985e9031
36 changed files with 167 additions and 190 deletions

View file

@ -8,13 +8,13 @@
struct input_config *new_input_config(const char* identifier) {
struct input_config *input = calloc(1, sizeof(struct input_config));
if (!input) {
sway_log(L_DEBUG, "Unable to allocate input config");
wlr_log(L_DEBUG, "Unable to allocate input config");
return NULL;
}
sway_log(L_DEBUG, "new_input_config(%s)", identifier);
wlr_log(L_DEBUG, "new_input_config(%s)", identifier);
if (!(input->identifier = strdup(identifier))) {
free(input);
sway_log(L_DEBUG, "Unable to allocate input config");
wlr_log(L_DEBUG, "Unable to allocate input config");
return NULL;
}

View file

@ -84,7 +84,7 @@ static void set_mode(struct wlr_output *output, int width, int height,
float refresh_rate) {
int mhz = (int)(refresh_rate * 1000);
if (wl_list_empty(&output->modes)) {
sway_log(L_DEBUG, "Assigning custom mode to %s", output->name);
wlr_log(L_DEBUG, "Assigning custom mode to %s", output->name);
wlr_output_set_custom_mode(output, width, height, mhz);
return;
}
@ -100,9 +100,9 @@ static void set_mode(struct wlr_output *output, int width, int height,
}
}
if (!best) {
sway_log(L_ERROR, "Configured mode for %s not available", output->name);
wlr_log(L_ERROR, "Configured mode for %s not available", output->name);
} else {
sway_log(L_DEBUG, "Assigning configured mode to %s", output->name);
wlr_log(L_DEBUG, "Assigning configured mode to %s", output->name);
wlr_output_set_mode(output, best);
}
}
@ -119,22 +119,22 @@ void apply_output_config(struct output_config *oc, swayc_t *output) {
}
if (oc && oc->width > 0 && oc->height > 0) {
sway_log(L_DEBUG, "Set %s mode to %dx%d (%f GHz)", oc->name, oc->width,
wlr_log(L_DEBUG, "Set %s mode to %dx%d (%f GHz)", oc->name, oc->width,
oc->height, oc->refresh_rate);
set_mode(wlr_output, oc->width, oc->height, oc->refresh_rate);
}
if (oc && oc->scale > 0) {
sway_log(L_DEBUG, "Set %s scale to %f", oc->name, oc->scale);
wlr_log(L_DEBUG, "Set %s scale to %f", oc->name, oc->scale);
wlr_output_set_scale(wlr_output, oc->scale);
}
if (oc && oc->transform >= 0) {
sway_log(L_DEBUG, "Set %s transform to %d", oc->name, oc->transform);
wlr_log(L_DEBUG, "Set %s transform to %d", oc->name, oc->transform);
wlr_output_set_transform(wlr_output, oc->transform);
}
// Find position for it
if (oc && (oc->x != -1 || oc->y != -1)) {
sway_log(L_DEBUG, "Set %s position to %d, %d", oc->name, oc->x, oc->y);
wlr_log(L_DEBUG, "Set %s position to %d, %d", oc->name, oc->x, oc->y);
wlr_output_layout_add(root_container.sway_root->output_layout,
wlr_output, oc->x, oc->y);
} else {
@ -165,7 +165,7 @@ void apply_output_config(struct output_config *oc, swayc_t *output) {
terminate_swaybg(output->bg_pid);
}
sway_log(L_DEBUG, "Setting background for output %d to %s", output_i, oc->background);
wlr_log(L_DEBUG, "Setting background for output %d to %s", output_i, oc->background);
size_t bufsize = 12;
char output_id[bufsize];

View file

@ -7,11 +7,11 @@
struct seat_config *new_seat_config(const char* name) {
struct seat_config *seat = calloc(1, sizeof(struct seat_config));
if (!seat) {
sway_log(L_DEBUG, "Unable to allocate seat config");
wlr_log(L_DEBUG, "Unable to allocate seat config");
return NULL;
}
sway_log(L_DEBUG, "new_seat_config(%s)", name);
wlr_log(L_DEBUG, "new_seat_config(%s)", name);
seat->name = strdup(name);
if (!sway_assert(seat->name, "could not allocate name for seat")) {
free(seat);
@ -34,7 +34,7 @@ struct seat_attachment_config *seat_attachment_config_new() {
struct seat_attachment_config *attachment =
calloc(1, sizeof(struct seat_attachment_config));
if (!attachment) {
sway_log(L_DEBUG, "cannot allocate attachment config");
wlr_log(L_DEBUG, "cannot allocate attachment config");
return NULL;
}
return attachment;