diff options
Diffstat (limited to 'sway/tree/layout.c')
-rw-r--r-- | sway/tree/layout.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sway/tree/layout.c b/sway/tree/layout.c index 4bcf0e2f..13b8a395 100644 --- a/sway/tree/layout.c +++ b/sway/tree/layout.c | |||
@@ -59,7 +59,7 @@ void init_layout(void) { | |||
59 | } | 59 | } |
60 | 60 | ||
61 | void add_child(swayc_t *parent, swayc_t *child) { | 61 | void add_child(swayc_t *parent, swayc_t *child) { |
62 | sway_log(L_DEBUG, "Adding %p (%d, %fx%f) to %p (%d, %fx%f)", | 62 | wlr_log(L_DEBUG, "Adding %p (%d, %fx%f) to %p (%d, %fx%f)", |
63 | child, child->type, child->width, child->height, | 63 | child, child->type, child->width, child->height, |
64 | parent, parent->type, parent->width, parent->height); | 64 | parent, parent->type, parent->width, parent->height); |
65 | list_add(parent->children, child); | 65 | list_add(parent->children, child); |
@@ -145,7 +145,7 @@ void arrange_windows(swayc_t *container, double width, double height) { | |||
145 | width = floor(width); | 145 | width = floor(width); |
146 | height = floor(height); | 146 | height = floor(height); |
147 | 147 | ||
148 | sway_log(L_DEBUG, "Arranging layout for %p %s %fx%f+%f,%f", container, | 148 | wlr_log(L_DEBUG, "Arranging layout for %p %s %fx%f+%f,%f", container, |
149 | container->name, container->width, container->height, container->x, | 149 | container->name, container->width, container->height, container->x, |
150 | container->y); | 150 | container->y); |
151 | 151 | ||
@@ -155,7 +155,7 @@ void arrange_windows(swayc_t *container, double width, double height) { | |||
155 | // TODO: wlr_output_layout probably | 155 | // TODO: wlr_output_layout probably |
156 | for (i = 0; i < container->children->length; ++i) { | 156 | for (i = 0; i < container->children->length; ++i) { |
157 | swayc_t *output = container->children->items[i]; | 157 | swayc_t *output = container->children->items[i]; |
158 | sway_log(L_DEBUG, "Arranging output '%s' at %f,%f", | 158 | wlr_log(L_DEBUG, "Arranging output '%s' at %f,%f", |
159 | output->name, output->x, output->y); | 159 | output->name, output->x, output->y); |
160 | arrange_windows(output, -1, -1); | 160 | arrange_windows(output, -1, -1); |
161 | } | 161 | } |
@@ -181,7 +181,7 @@ void arrange_windows(swayc_t *container, double width, double height) { | |||
181 | container->height = output->height; | 181 | container->height = output->height; |
182 | container->x = x; | 182 | container->x = x; |
183 | container->y = y; | 183 | container->y = y; |
184 | sway_log(L_DEBUG, "Arranging workspace '%s' at %f, %f", | 184 | wlr_log(L_DEBUG, "Arranging workspace '%s' at %f, %f", |
185 | container->name, container->x, container->y); | 185 | container->name, container->x, container->y); |
186 | } | 186 | } |
187 | // children are properly handled below | 187 | // children are properly handled below |
@@ -192,7 +192,7 @@ void arrange_windows(swayc_t *container, double width, double height) { | |||
192 | container->height = height; | 192 | container->height = height; |
193 | container->sway_view->iface.set_size(container->sway_view, | 193 | container->sway_view->iface.set_size(container->sway_view, |
194 | container->width, container->height); | 194 | container->width, container->height); |
195 | sway_log(L_DEBUG, "Set view to %.f x %.f @ %.f, %.f", | 195 | wlr_log(L_DEBUG, "Set view to %.f x %.f @ %.f, %.f", |
196 | container->width, container->height, | 196 | container->width, container->height, |
197 | container->x, container->y); | 197 | container->x, container->y); |
198 | } | 198 | } |
@@ -215,7 +215,7 @@ void arrange_windows(swayc_t *container, double width, double height) { | |||
215 | container->children->length); | 215 | container->children->length); |
216 | break; | 216 | break; |
217 | default: | 217 | default: |
218 | sway_log(L_DEBUG, "TODO: arrange layout type %d", container->layout); | 218 | wlr_log(L_DEBUG, "TODO: arrange layout type %d", container->layout); |
219 | apply_horiz_layout(container, x, y, width, height, 0, | 219 | apply_horiz_layout(container, x, y, width, height, 0, |
220 | container->children->length); | 220 | container->children->length); |
221 | break; | 221 | break; |
@@ -244,10 +244,10 @@ static void apply_horiz_layout(swayc_t *container, | |||
244 | // Resize windows | 244 | // Resize windows |
245 | double child_x = x; | 245 | double child_x = x; |
246 | if (scale > 0.1) { | 246 | if (scale > 0.1) { |
247 | sway_log(L_DEBUG, "Arranging %p horizontally", container); | 247 | wlr_log(L_DEBUG, "Arranging %p horizontally", container); |
248 | for (int i = start; i < end; ++i) { | 248 | for (int i = start; i < end; ++i) { |
249 | swayc_t *child = container->children->items[i]; | 249 | swayc_t *child = container->children->items[i]; |
250 | sway_log(L_DEBUG, | 250 | wlr_log(L_DEBUG, |
251 | "Calculating arrangement for %p:%d (will scale %f by %f)", | 251 | "Calculating arrangement for %p:%d (will scale %f by %f)", |
252 | child, child->type, width, scale); | 252 | child, child->type, width, scale); |
253 | child->sway_view->iface.set_position(child->sway_view, child_x, y); | 253 | child->sway_view->iface.set_position(child->sway_view, child_x, y); |
@@ -294,10 +294,10 @@ void apply_vert_layout(swayc_t *container, | |||
294 | // Resize | 294 | // Resize |
295 | double child_y = y; | 295 | double child_y = y; |
296 | if (scale > 0.1) { | 296 | if (scale > 0.1) { |
297 | sway_log(L_DEBUG, "Arranging %p vertically", container); | 297 | wlr_log(L_DEBUG, "Arranging %p vertically", container); |
298 | for (i = start; i < end; ++i) { | 298 | for (i = start; i < end; ++i) { |
299 | swayc_t *child = container->children->items[i]; | 299 | swayc_t *child = container->children->items[i]; |
300 | sway_log(L_DEBUG, | 300 | wlr_log(L_DEBUG, |
301 | "Calculating arrangement for %p:%d (will scale %f by %f)", | 301 | "Calculating arrangement for %p:%d (will scale %f by %f)", |
302 | child, child->type, height, scale); | 302 | child, child->type, height, scale); |
303 | child->sway_view->iface.set_position(child->sway_view, x, child_y); | 303 | child->sway_view->iface.set_position(child->sway_view, x, child_y); |