From 8419a503313f4e734465b726f897833e094c91b3 Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Sat, 16 Mar 2024 23:59:27 +0100 Subject: Update layout animation for singleton groups --- src/draw.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3