aboutsummaryrefslogtreecommitdiff
path: root/sway/tree/arrange.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/arrange.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/arrange.c')
-rw-r--r--sway/tree/arrange.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sway/tree/arrange.c b/sway/tree/arrange.c
index 852d53bf..f78d95a4 100644
--- a/sway/tree/arrange.c
+++ b/sway/tree/arrange.c
@@ -35,7 +35,7 @@ static void apply_horiz_layout(list_t *children, struct wlr_box *parent) {
double scale = parent->width / total_width;
// Resize windows
- wlr_log(WLR_DEBUG, "Arranging %p horizontally", parent);
+ sway_log(SWAY_DEBUG, "Arranging %p horizontally", parent);
double child_x = parent->x;
for (int i = 0; i < children->length; ++i) {
struct sway_container *child = children->items[i];
@@ -75,7 +75,7 @@ static void apply_vert_layout(list_t *children, struct wlr_box *parent) {
double scale = parent->height / total_height;
// Resize
- wlr_log(WLR_DEBUG, "Arranging %p vertically", parent);
+ sway_log(SWAY_DEBUG, "Arranging %p vertically", parent);
double child_y = parent->y;
for (int i = 0; i < children->length; ++i) {
struct sway_container *child = children->items[i];
@@ -186,7 +186,7 @@ void arrange_workspace(struct sway_workspace *workspace) {
}
struct sway_output *output = workspace->output;
struct wlr_box *area = &output->usable_area;
- wlr_log(WLR_DEBUG, "Usable area for ws: %dx%d@%d,%d",
+ sway_log(SWAY_DEBUG, "Usable area for ws: %dx%d@%d,%d",
area->width, area->height, area->x, area->y);
workspace_remove_gaps(workspace);
@@ -217,7 +217,7 @@ void arrange_workspace(struct sway_workspace *workspace) {
workspace_add_gaps(workspace);
node_set_dirty(&workspace->node);
- wlr_log(WLR_DEBUG, "Arranging workspace '%s' at %f, %f", workspace->name,
+ sway_log(SWAY_DEBUG, "Arranging workspace '%s' at %f, %f", workspace->name,
workspace->x, workspace->y);
if (workspace->fullscreen) {
struct sway_container *fs = workspace->fullscreen;