aboutsummaryrefslogtreecommitdiff
path: root/src/draw.c
diff options
context:
space:
mode:
authorFederico Angelilli <code@fedang.net>2024-03-15 21:49:36 +0100
committerFederico Angelilli <code@fedang.net>2024-03-15 21:49:36 +0100
commitbccbbedf91365a4aa6e23958d9f1713723a1f1bd (patch)
treedb96b0898e84164d4805dd4e56dde3c3ce386092 /src/draw.c
parent056dfd80b930abe56e151d4ebafae248fb0fa5a0 (diff)
Make button click detection work with the new layouts
Diffstat (limited to 'src/draw.c')
-rw-r--r--src/draw.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/draw.c b/src/draw.c
index 7ee9de4..13e9058 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -265,6 +265,9 @@ void draw_compute_layout(Drawer *draw, Window *win, GList *btns)
layout->width = x - layout->x;
layout->height = height;
+ // Otherwise button_action_find will not work!
+ layout->children = g_list_reverse(layout->children);
+
// FIXME: Temporary solution to make the antialiasing (or the circles not overlapping correctly) problem less noticeable
bool fix_left = CAST(g_list_first(group->children)->data, Button)->x_pad == 0;