aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/xwayland.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/desktop/xwayland.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/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(
118 struct sway_xwayland_unmanaged *surface = 118 struct sway_xwayland_unmanaged *surface =
119 calloc(1, sizeof(struct sway_xwayland_unmanaged)); 119 calloc(1, sizeof(struct sway_xwayland_unmanaged));
120 if (surface == NULL) { 120 if (surface == NULL) {
121 wlr_log(WLR_ERROR, "Allocation failed"); 121 sway_log(SWAY_ERROR, "Allocation failed");
122 return NULL; 122 return NULL;
123 } 123 }
124 124
@@ -578,12 +578,12 @@ void handle_xwayland_surface(struct wl_listener *listener, void *data) {
578 struct wlr_xwayland_surface *xsurface = data; 578 struct wlr_xwayland_surface *xsurface = data;
579 579
580 if (xsurface->override_redirect) { 580 if (xsurface->override_redirect) {
581 wlr_log(WLR_DEBUG, "New xwayland unmanaged surface"); 581 sway_log(SWAY_DEBUG, "New xwayland unmanaged surface");
582 create_unmanaged(xsurface); 582 create_unmanaged(xsurface);
583 return; 583 return;
584 } 584 }
585 585
586 wlr_log(WLR_DEBUG, "New xwayland surface title='%s' class='%s'", 586 sway_log(SWAY_DEBUG, "New xwayland surface title='%s' class='%s'",
587 xsurface->title, xsurface->class); 587 xsurface->title, xsurface->class);
588 588
589 struct sway_xwayland_view *xwayland_view = 589 struct sway_xwayland_view *xwayland_view =
@@ -655,7 +655,7 @@ void handle_xwayland_ready(struct wl_listener *listener, void *data) {
655 xcb_connection_t *xcb_conn = xcb_connect(NULL, NULL); 655 xcb_connection_t *xcb_conn = xcb_connect(NULL, NULL);
656 int err = xcb_connection_has_error(xcb_conn); 656 int err = xcb_connection_has_error(xcb_conn);
657 if (err) { 657 if (err) {
658 wlr_log(WLR_ERROR, "XCB connect failed: %d", err); 658 sway_log(SWAY_ERROR, "XCB connect failed: %d", err);
659 return; 659 return;
660 } 660 }
661 661
@@ -674,7 +674,7 @@ void handle_xwayland_ready(struct wl_listener *listener, void *data) {
674 free(reply); 674 free(reply);
675 675
676 if (error != NULL) { 676 if (error != NULL) {
677 wlr_log(WLR_ERROR, "could not resolve atom %s, X11 error code %d", 677 sway_log(SWAY_ERROR, "could not resolve atom %s, X11 error code %d",
678 atom_map[i], error->error_code); 678 atom_map[i], error->error_code);
679 free(error); 679 free(error);
680 break; 680 break;