mirror of
https://github.com/swaywm/sway.git
synced 2025-11-20 06:59:46 -05:00
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.
This commit is contained in:
parent
5c834d36e1
commit
1211a81aad
108 changed files with 613 additions and 504 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue