aboutsummaryrefslogtreecommitdiff
path: root/sway/tree/output.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/tree/output.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/tree/output.c')
-rw-r--r--sway/tree/output.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sway/tree/output.c b/sway/tree/output.c
index b79e70d4..7fbeeebd 100644
--- a/sway/tree/output.c
+++ b/sway/tree/output.c
@@ -97,7 +97,7 @@ void output_enable(struct sway_output *output, struct output_config *oc) {
if (!output->workspaces->length) {
// Create workspace
char *ws_name = workspace_next_name(wlr_output->name);
- wlr_log(WLR_DEBUG, "Creating default workspace %s", ws_name);
+ sway_log(SWAY_DEBUG, "Creating default workspace %s", ws_name);
ws = workspace_create(output, ws_name);
// Set each seat's focus if not already set
struct sway_seat *seat = NULL;
@@ -212,7 +212,7 @@ void output_disable(struct sway_output *output) {
if (!sway_assert(output->enabled, "Expected an enabled output")) {
return;
}
- wlr_log(WLR_DEBUG, "Disabling output '%s'", output->wlr_output->name);
+ sway_log(SWAY_DEBUG, "Disabling output '%s'", output->wlr_output->name);
wl_signal_emit(&output->events.destroy, output);
output_evacuate(output);
@@ -237,7 +237,7 @@ void output_begin_destroy(struct sway_output *output) {
if (!sway_assert(!output->enabled, "Expected a disabled output")) {
return;
}
- wlr_log(WLR_DEBUG, "Destroying output '%s'", output->wlr_output->name);
+ sway_log(SWAY_DEBUG, "Destroying output '%s'", output->wlr_output->name);
output->node.destroying = true;
node_set_dirty(&output->node);
@@ -258,11 +258,11 @@ struct output_config *output_find_config(struct sway_output *output) {
if (strcasecmp(name, cur->name) == 0 ||
strcasecmp(identifier, cur->name) == 0) {
- wlr_log(WLR_DEBUG, "Matched output config for %s", name);
+ sway_log(SWAY_DEBUG, "Matched output config for %s", name);
oc = cur;
}
if (strcasecmp("*", cur->name) == 0) {
- wlr_log(WLR_DEBUG, "Matched wildcard output config for %s", name);
+ sway_log(SWAY_DEBUG, "Matched wildcard output config for %s", name);
all = cur;
}