aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/output.c
diff options
context:
space:
mode:
authorLibravatar M Stoeckl <code@mstoeckl.com>2019-01-20 13:51:12 -0500
committerLibravatar emersion <contact@emersion.fr>2019-01-21 12:59:42 +0100
commit1211a81aad18bbc4d9e8fb9973238ad8e7e1f688 (patch)
tree5c3f60e0219cb8b4a1b7cafb760a871661866e32 /sway/tree/output.c
parentLog libinput_config_status errors (diff)
downloadsway-1211a81aad18bbc4d9e8fb9973238ad8e7e1f688.tar.gz
sway-1211a81aad18bbc4d9e8fb9973238ad8e7e1f688.tar.zst
sway-1211a81aad18bbc4d9e8fb9973238ad8e7e1f688.zip
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) {
97 if (!output->workspaces->length) { 97 if (!output->workspaces->length) {
98 // Create workspace 98 // Create workspace
99 char *ws_name = workspace_next_name(wlr_output->name); 99 char *ws_name = workspace_next_name(wlr_output->name);
100 wlr_log(WLR_DEBUG, "Creating default workspace %s", ws_name); 100 sway_log(SWAY_DEBUG, "Creating default workspace %s", ws_name);
101 ws = workspace_create(output, ws_name); 101 ws = workspace_create(output, ws_name);
102 // Set each seat's focus if not already set 102 // Set each seat's focus if not already set
103 struct sway_seat *seat = NULL; 103 struct sway_seat *seat = NULL;
@@ -212,7 +212,7 @@ void output_disable(struct sway_output *output) {
212 if (!sway_assert(output->enabled, "Expected an enabled output")) { 212 if (!sway_assert(output->enabled, "Expected an enabled output")) {
213 return; 213 return;
214 } 214 }
215 wlr_log(WLR_DEBUG, "Disabling output '%s'", output->wlr_output->name); 215 sway_log(SWAY_DEBUG, "Disabling output '%s'", output->wlr_output->name);
216 wl_signal_emit(&output->events.destroy, output); 216 wl_signal_emit(&output->events.destroy, output);
217 217
218 output_evacuate(output); 218 output_evacuate(output);
@@ -237,7 +237,7 @@ void output_begin_destroy(struct sway_output *output) {
237 if (!sway_assert(!output->enabled, "Expected a disabled output")) { 237 if (!sway_assert(!output->enabled, "Expected a disabled output")) {
238 return; 238 return;
239 } 239 }
240 wlr_log(WLR_DEBUG, "Destroying output '%s'", output->wlr_output->name); 240 sway_log(SWAY_DEBUG, "Destroying output '%s'", output->wlr_output->name);
241 241
242 output->node.destroying = true; 242 output->node.destroying = true;
243 node_set_dirty(&output->node); 243 node_set_dirty(&output->node);
@@ -258,11 +258,11 @@ struct output_config *output_find_config(struct sway_output *output) {
258 258
259 if (strcasecmp(name, cur->name) == 0 || 259 if (strcasecmp(name, cur->name) == 0 ||
260 strcasecmp(identifier, cur->name) == 0) { 260 strcasecmp(identifier, cur->name) == 0) {
261 wlr_log(WLR_DEBUG, "Matched output config for %s", name); 261 sway_log(SWAY_DEBUG, "Matched output config for %s", name);
262 oc = cur; 262 oc = cur;
263 } 263 }
264 if (strcasecmp("*", cur->name) == 0) { 264 if (strcasecmp("*", cur->name) == 0) {
265 wlr_log(WLR_DEBUG, "Matched wildcard output config for %s", name); 265 sway_log(SWAY_DEBUG, "Matched wildcard output config for %s", name);
266 all = cur; 266 all = cur;
267 } 267 }
268 268