aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop/xwayland.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/desktop/xwayland.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/desktop/xwayland.c')
-rw-r--r--sway/desktop/xwayland.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
index 080f6c41..8dcf4bd6 100644
--- a/sway/desktop/xwayland.c
+++ b/sway/desktop/xwayland.c
@@ -118,7 +118,7 @@ static struct sway_xwayland_unmanaged *create_unmanaged(
struct sway_xwayland_unmanaged *surface =
calloc(1, sizeof(struct sway_xwayland_unmanaged));
if (surface == NULL) {
- wlr_log(WLR_ERROR, "Allocation failed");
+ sway_log(SWAY_ERROR, "Allocation failed");
return NULL;
}
@@ -578,12 +578,12 @@ void handle_xwayland_surface(struct wl_listener *listener, void *data) {
struct wlr_xwayland_surface *xsurface = data;
if (xsurface->override_redirect) {
- wlr_log(WLR_DEBUG, "New xwayland unmanaged surface");
+ sway_log(SWAY_DEBUG, "New xwayland unmanaged surface");
create_unmanaged(xsurface);
return;
}
- wlr_log(WLR_DEBUG, "New xwayland surface title='%s' class='%s'",
+ sway_log(SWAY_DEBUG, "New xwayland surface title='%s' class='%s'",
xsurface->title, xsurface->class);
struct sway_xwayland_view *xwayland_view =
@@ -655,7 +655,7 @@ void handle_xwayland_ready(struct wl_listener *listener, void *data) {
xcb_connection_t *xcb_conn = xcb_connect(NULL, NULL);
int err = xcb_connection_has_error(xcb_conn);
if (err) {
- wlr_log(WLR_ERROR, "XCB connect failed: %d", err);
+ sway_log(SWAY_ERROR, "XCB connect failed: %d", err);
return;
}
@@ -674,7 +674,7 @@ void handle_xwayland_ready(struct wl_listener *listener, void *data) {
free(reply);
if (error != NULL) {
- wlr_log(WLR_ERROR, "could not resolve atom %s, X11 error code %d",
+ sway_log(SWAY_ERROR, "could not resolve atom %s, X11 error code %d",
atom_map[i], error->error_code);
free(error);
break;