aboutsummaryrefslogtreecommitdiffstats
path: root/swaybar/config.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 /swaybar/config.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 'swaybar/config.c')
-rw-r--r--swaybar/config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/swaybar/config.c b/swaybar/config.c
index 0071c7f9..b94fcfee 100644
--- a/swaybar/config.c
+++ b/swaybar/config.c
@@ -1,12 +1,12 @@
1#define _POSIX_C_SOURCE 200809L 1#define _POSIX_C_SOURCE 200809L
2#include <stdlib.h> 2#include <stdlib.h>
3#include <string.h> 3#include <string.h>
4#include <wlr/util/log.h>
5#include "swaybar/config.h" 4#include "swaybar/config.h"
6#include "wlr-layer-shell-unstable-v1-client-protocol.h" 5#include "wlr-layer-shell-unstable-v1-client-protocol.h"
7#include "config.h" 6#include "config.h"
8#include "stringop.h" 7#include "stringop.h"
9#include "list.h" 8#include "list.h"
9#include "log.h"
10 10
11uint32_t parse_position(const char *position) { 11uint32_t parse_position(const char *position) {
12 uint32_t horiz = ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT | 12 uint32_t horiz = ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT |
@@ -16,7 +16,7 @@ uint32_t parse_position(const char *position) {
16 } else if (strcmp("bottom", position) == 0) { 16 } else if (strcmp("bottom", position) == 0) {
17 return ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM | horiz; 17 return ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM | horiz;
18 } else { 18 } else {
19 wlr_log(WLR_ERROR, "Invalid position: %s, defaulting to bottom", position); 19 sway_log(SWAY_ERROR, "Invalid position: %s, defaulting to bottom", position);
20 return ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM | horiz; 20 return ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM | horiz;
21 } 21 }
22} 22}