aboutsummaryrefslogtreecommitdiff
path: root/sway/config/seat.c
diff options
context:
space:
mode:
authorM Stoeckl <code@mstoeckl.com>2019-01-20 13:51:12 -0500
committeremersion <contact@emersion.fr>2019-01-21 12:59:42 +0100
commit1211a81aad18bbc4d9e8fb9973238ad8e7e1f688 (patch)
tree5c3f60e0219cb8b4a1b7cafb760a871661866e32 /sway/config/seat.c
parent5c834d36e14aaeca4ac1d22b869254d5722af4af (diff)
Replace wlr_log with sway_log
This commit mostly duplicates the wlr_log functions, although with a sway_* prefix. (This is very similar to PR #2009.) However, the logging function no longer needs to be replaceable, so sway_log_init's second argument is used to set the exit callback for sway_abort. wlr_log_init is still invoked in sway/main.c This commit makes it easier to remove the wlroots dependency for the helper programs swaymsg, swaybg, swaybar, and swaynag.
Diffstat (limited to 'sway/config/seat.c')
-rw-r--r--sway/config/seat.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sway/config/seat.c b/sway/config/seat.c
index d7316c68..92dc42e3 100644
--- a/sway/config/seat.c
+++ b/sway/config/seat.c
@@ -7,7 +7,7 @@
struct seat_config *new_seat_config(const char* name) {
struct seat_config *seat = calloc(1, sizeof(struct seat_config));
if (!seat) {
- wlr_log(WLR_DEBUG, "Unable to allocate seat config");
+ sway_log(SWAY_DEBUG, "Unable to allocate seat config");
return NULL;
}
@@ -34,7 +34,7 @@ static void merge_wildcard_on_all(struct seat_config *wildcard) {
for (int i = 0; i < config->seat_configs->length; i++) {
struct seat_config *sc = config->seat_configs->items[i];
if (strcmp(wildcard->name, sc->name) != 0) {
- wlr_log(WLR_DEBUG, "Merging seat * config on %s", sc->name);
+ sway_log(SWAY_DEBUG, "Merging seat * config on %s", sc->name);
merge_seat_config(sc, wildcard);
}
}
@@ -48,16 +48,16 @@ struct seat_config *store_seat_config(struct seat_config *sc) {
int i = list_seq_find(config->seat_configs, seat_name_cmp, sc->name);
if (i >= 0) {
- wlr_log(WLR_DEBUG, "Merging on top of existing seat config");
+ sway_log(SWAY_DEBUG, "Merging on top of existing seat config");
struct seat_config *current = config->seat_configs->items[i];
merge_seat_config(current, sc);
free_seat_config(sc);
sc = current;
} else if (!wildcard) {
- wlr_log(WLR_DEBUG, "Adding non-wildcard seat config");
+ sway_log(SWAY_DEBUG, "Adding non-wildcard seat config");
i = list_seq_find(config->seat_configs, seat_name_cmp, "*");
if (i >= 0) {
- wlr_log(WLR_DEBUG, "Merging on top of seat * config");
+ sway_log(SWAY_DEBUG, "Merging on top of seat * config");
struct seat_config *current = new_seat_config(sc->name);
merge_seat_config(current, config->seat_configs->items[i]);
merge_seat_config(current, sc);
@@ -67,11 +67,11 @@ struct seat_config *store_seat_config(struct seat_config *sc) {
list_add(config->seat_configs, sc);
} else {
// New wildcard config. Just add it
- wlr_log(WLR_DEBUG, "Adding seat * config");
+ sway_log(SWAY_DEBUG, "Adding seat * config");
list_add(config->seat_configs, sc);
}
- wlr_log(WLR_DEBUG, "Config stored for seat %s", sc->name);
+ sway_log(SWAY_DEBUG, "Config stored for seat %s", sc->name);
return sc;
}
@@ -80,7 +80,7 @@ struct seat_attachment_config *seat_attachment_config_new(void) {
struct seat_attachment_config *attachment =
calloc(1, sizeof(struct seat_attachment_config));
if (!attachment) {
- wlr_log(WLR_DEBUG, "cannot allocate attachment config");
+ sway_log(SWAY_DEBUG, "cannot allocate attachment config");
return NULL;
}
return attachment;