aboutsummaryrefslogtreecommitdiff
path: root/sway/tree/view.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/tree/view.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/tree/view.c')
-rw-r--r--sway/tree/view.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index e65968c6..bc252521 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -328,7 +328,7 @@ void view_request_activate(struct sway_view *view) {
}
void view_set_csd_from_server(struct sway_view *view, bool enabled) {
- wlr_log(WLR_DEBUG, "Telling view %p to set CSD to %i", view, enabled);
+ sway_log(SWAY_DEBUG, "Telling view %p to set CSD to %i", view, enabled);
if (view->xdg_decoration) {
uint32_t mode = enabled ?
WLR_XDG_TOPLEVEL_DECORATION_V1_MODE_CLIENT_SIDE :
@@ -340,7 +340,7 @@ void view_set_csd_from_server(struct sway_view *view, bool enabled) {
}
void view_update_csd_from_client(struct sway_view *view, bool enabled) {
- wlr_log(WLR_DEBUG, "View %p updated CSD to %i", view, enabled);
+ sway_log(SWAY_DEBUG, "View %p updated CSD to %i", view, enabled);
struct sway_container *con = view->container;
if (enabled && con && con->border != B_CSD) {
con->saved_border = con->border;
@@ -429,12 +429,12 @@ void view_execute_criteria(struct sway_view *view) {
list_t *criterias = criteria_for_view(view, CT_COMMAND);
for (int i = 0; i < criterias->length; i++) {
struct criteria *criteria = criterias->items[i];
- wlr_log(WLR_DEBUG, "Checking criteria %s", criteria->raw);
+ sway_log(SWAY_DEBUG, "Checking criteria %s", criteria->raw);
if (view_has_executed_criteria(view, criteria)) {
- wlr_log(WLR_DEBUG, "Criteria already executed");
+ sway_log(SWAY_DEBUG, "Criteria already executed");
continue;
}
- wlr_log(WLR_DEBUG, "for_window '%s' matches view %p, cmd: '%s'",
+ sway_log(SWAY_DEBUG, "for_window '%s' matches view %p, cmd: '%s'",
criteria->raw, view, criteria->cmdlist);
list_add(view->executed_criteria, criteria);
list_t *res_list = execute_command(
@@ -721,7 +721,7 @@ static void view_subsurface_create(struct sway_view *view,
struct sway_subsurface *subsurface =
calloc(1, sizeof(struct sway_subsurface));
if (subsurface == NULL) {
- wlr_log(WLR_ERROR, "Allocation failed");
+ sway_log(SWAY_ERROR, "Allocation failed");
return;
}
view_child_init(&subsurface->child, &subsurface_impl, view,
@@ -860,7 +860,7 @@ struct sway_view *view_from_wlr_surface(struct wlr_surface *wlr_surface) {
}
const char *role = wlr_surface->role ? wlr_surface->role->name : NULL;
- wlr_log(WLR_DEBUG, "Surface of unknown type (role %s): %p",
+ sway_log(SWAY_DEBUG, "Surface of unknown type (role %s): %p",
role, wlr_surface);
return NULL;
}