aboutsummaryrefslogtreecommitdiff
path: root/src/draw.c
diff options
context:
space:
mode:
authorFederico Angelilli <code@fedang.net>2024-03-16 23:59:27 +0100
committerFederico Angelilli <code@fedang.net>2024-03-16 23:59:27 +0100
commit8419a503313f4e734465b726f897833e094c91b3 (patch)
treea8ed77545a4b99e93e61577bfc78c01e7769b99f /src/draw.c
parent052bf22dc6bebb84b3a3b0216ff8827146668a62 (diff)
Update layout animation for singleton groups
Diffstat (limited to 'src/draw.c')
-rw-r--r--src/draw.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/draw.c b/src/draw.c
index 51a8a59..525ecd7 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -189,6 +189,7 @@ static void compute_width(Drawer *draw, Window *win)
static void layout_check_width(Layout *layout)
{
+ // FIXME: Max width is not implemented correctly
if (layout->btn->max_width > 0)
layout->width = MIN(layout->btn->max_width, layout->width);
@@ -221,8 +222,11 @@ retry:
// NOTE: If a group has only one children treat it as a single button
// As a consequence btn->align can't be trusted
if (group->children->next == NULL) {
+ // XXX: We should also keep track of the group animation
+ // Is this the right way to do it? Can it loop?
+ ANIMATION(btn, layout, layout);
+
layout->btn = btn = group->children->data;
- g_assert_true(btn->simple);
goto retry;
} else {
layout->children = compute_group_layout(draw, group->children, bx, false);