aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/layout.c
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2018-04-02 10:57:45 -0400
committerLibravatar emersion <contact@emersion.fr>2018-04-02 10:57:45 -0400
commit61fabede14bb3a8fe9ee5a249352cd405fd1b9bf (patch)
treede0cc1378f2edba5cc194c8dcebe4d5fdaeda647 /sway/tree/layout.c
parentAdd sway_view_impl (diff)
downloadsway-61fabede14bb3a8fe9ee5a249352cd405fd1b9bf.tar.gz
sway-61fabede14bb3a8fe9ee5a249352cd405fd1b9bf.tar.zst
sway-61fabede14bb3a8fe9ee5a249352cd405fd1b9bf.zip
Address review comments
Diffstat (limited to 'sway/tree/layout.c')
-rw-r--r--sway/tree/layout.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sway/tree/layout.c b/sway/tree/layout.c
index ce0682dc..3fec02a1 100644
--- a/sway/tree/layout.c
+++ b/sway/tree/layout.c
@@ -261,7 +261,7 @@ void arrange_windows(struct sway_container *container,
261 { 261 {
262 container->width = width; 262 container->width = width;
263 container->height = height; 263 container->height = height;
264 view_set_size(container->sway_view, 264 view_configure(container->sway_view, container->x, container->y,
265 container->width, container->height); 265 container->width, container->height);
266 wlr_log(L_DEBUG, "Set view to %.f x %.f @ %.f, %.f", 266 wlr_log(L_DEBUG, "Set view to %.f x %.f @ %.f, %.f",
267 container->width, container->height, 267 container->width, container->height,
@@ -322,7 +322,8 @@ static void apply_horiz_layout(struct sway_container *container,
322 wlr_log(L_DEBUG, 322 wlr_log(L_DEBUG,
323 "Calculating arrangement for %p:%d (will scale %f by %f)", 323 "Calculating arrangement for %p:%d (will scale %f by %f)",
324 child, child->type, width, scale); 324 child, child->type, width, scale);
325 view_set_position(child->sway_view, child_x, y); 325 view_configure(child->sway_view, child_x, y, child->width,
326 child->height);
326 327
327 if (i == end - 1) { 328 if (i == end - 1) {
328 double remaining_width = x + width - child_x; 329 double remaining_width = x + width - child_x;
@@ -373,7 +374,8 @@ void apply_vert_layout(struct sway_container *container,
373 wlr_log(L_DEBUG, 374 wlr_log(L_DEBUG,
374 "Calculating arrangement for %p:%d (will scale %f by %f)", 375 "Calculating arrangement for %p:%d (will scale %f by %f)",
375 child, child->type, height, scale); 376 child, child->type, height, scale);
376 view_set_position(child->sway_view, x, child_y); 377 view_configure(child->sway_view, x, child_y, child->width,
378 child->height);
377 379
378 if (i == end - 1) { 380 if (i == end - 1) {
379 double remaining_height = y + height - child_y; 381 double remaining_height = y + height - child_y;