summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar S. Christoffer Eliesen <christoffer@eliesen.no>2015-12-18 23:52:19 +0100
committerLibravatar S. Christoffer Eliesen <christoffer@eliesen.no>2015-12-18 23:53:42 +0100
commitf0b3ee6d84ebbf6a7c47cb3c0437c4dc3c87e67b (patch)
tree32058f1b743f8e60fb38166108f15660b428a565
parentlayout: arrange_windows: Fix/better debug output. (diff)
downloadsway-f0b3ee6d84ebbf6a7c47cb3c0437c4dc3c87e67b.tar.gz
sway-f0b3ee6d84ebbf6a7c47cb3c0437c4dc3c87e67b.tar.zst
sway-f0b3ee6d84ebbf6a7c47cb3c0437c4dc3c87e67b.zip
layout: arrange_windows: Partially fix swaybar irregularties.
-rw-r--r--sway/layout.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sway/layout.c b/sway/layout.c
index 975cb5cb..5b7dc486 100644
--- a/sway/layout.c
+++ b/sway/layout.c
@@ -450,7 +450,7 @@ static void arrange_windows_r(swayc_t *container, double width, double height) {
450 case C_WORKSPACE: 450 case C_WORKSPACE:
451 { 451 {
452 swayc_t *output = swayc_parent_by_type(container, C_OUTPUT); 452 swayc_t *output = swayc_parent_by_type(container, C_OUTPUT);
453 int width = output->width, height = output->height; 453 width = output->width, height = output->height;
454 for (i = 0; i < desktop_shell.panels->length; ++i) { 454 for (i = 0; i < desktop_shell.panels->length; ++i) {
455 struct panel_config *config = desktop_shell.panels->items[i]; 455 struct panel_config *config = desktop_shell.panels->items[i];
456 if (config->output == output->handle) { 456 if (config->output == output->handle) {
@@ -473,10 +473,10 @@ static void arrange_windows_r(swayc_t *container, double width, double height) {
473 } 473 }
474 } 474 }
475 int gap = swayc_gap(container); 475 int gap = swayc_gap(container);
476 container->x = gap; 476 container->x = x + gap;
477 container->y = gap; 477 container->y = y + gap;
478 container->width = width - gap * 2; 478 width = container->width = width - gap * 2;
479 container->height = height - gap * 2; 479 height = container->height = height - gap * 2;
480 sway_log(L_DEBUG, "Arranging workspace '%s' at %f, %f", container->name, container->x, container->y); 480 sway_log(L_DEBUG, "Arranging workspace '%s' at %f, %f", container->name, container->x, container->y);
481 } 481 }
482 // children are properly handled below 482 // children are properly handled below