aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/arrange.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/tree/arrange.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/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) {
35 double scale = parent->width / total_width; 35 double scale = parent->width / total_width;
36 36
37 // Resize windows 37 // Resize windows
38 wlr_log(WLR_DEBUG, "Arranging %p horizontally", parent); 38 sway_log(SWAY_DEBUG, "Arranging %p horizontally", parent);
39 double child_x = parent->x; 39 double child_x = parent->x;
40 for (int i = 0; i < children->length; ++i) { 40 for (int i = 0; i < children->length; ++i) {
41 struct sway_container *child = children->items[i]; 41 struct sway_container *child = children->items[i];
@@ -75,7 +75,7 @@ static void apply_vert_layout(list_t *children, struct wlr_box *parent) {
75 double scale = parent->height / total_height; 75 double scale = parent->height / total_height;
76 76
77 // Resize 77 // Resize
78 wlr_log(WLR_DEBUG, "Arranging %p vertically", parent); 78 sway_log(SWAY_DEBUG, "Arranging %p vertically", parent);
79 double child_y = parent->y; 79 double child_y = parent->y;
80 for (int i = 0; i < children->length; ++i) { 80 for (int i = 0; i < children->length; ++i) {
81 struct sway_container *child = children->items[i]; 81 struct sway_container *child = children->items[i];
@@ -186,7 +186,7 @@ void arrange_workspace(struct sway_workspace *workspace) {
186 } 186 }
187 struct sway_output *output = workspace->output; 187 struct sway_output *output = workspace->output;
188 struct wlr_box *area = &output->usable_area; 188 struct wlr_box *area = &output->usable_area;
189 wlr_log(WLR_DEBUG, "Usable area for ws: %dx%d@%d,%d", 189 sway_log(SWAY_DEBUG, "Usable area for ws: %dx%d@%d,%d",
190 area->width, area->height, area->x, area->y); 190 area->width, area->height, area->x, area->y);
191 workspace_remove_gaps(workspace); 191 workspace_remove_gaps(workspace);
192 192
@@ -217,7 +217,7 @@ void arrange_workspace(struct sway_workspace *workspace) {
217 217
218 workspace_add_gaps(workspace); 218 workspace_add_gaps(workspace);
219 node_set_dirty(&workspace->node); 219 node_set_dirty(&workspace->node);
220 wlr_log(WLR_DEBUG, "Arranging workspace '%s' at %f, %f", workspace->name, 220 sway_log(SWAY_DEBUG, "Arranging workspace '%s' at %f, %f", workspace->name,
221 workspace->x, workspace->y); 221 workspace->x, workspace->y);
222 if (workspace->fullscreen) { 222 if (workspace->fullscreen) {
223 struct sway_container *fs = workspace->fullscreen; 223 struct sway_container *fs = workspace->fullscreen;