aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2022-07-15 01:01:04 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2022-07-15 01:03:36 +0200
commit938b35033b7872e9abc8b0ed4b28e0ab6542a783 (patch)
tree6deb5148e46a5a28c3abc8eeb9ca43b2291b3306 /src
parente66894e3f88865c5b175fbec84cdf2584d9a1a00 (diff)
downloadjancity-938b35033b7872e9abc8b0ed4b28e0ab6542a783.tar.gz
gui: Update elements in reverse order
This allows to calculate dimensions for containers with children containers in it.
Diffstat (limited to 'src')
-rw-r--r--src/gui/src/gui.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/src/gui.c b/src/gui/src/gui.c
index f65ed91..022ce73 100644
--- a/src/gui/src/gui.c
+++ b/src/gui/src/gui.c
@@ -79,10 +79,10 @@ void gui_add_child(struct gui_common *const p,
int gui_update(struct gui_common *const g, const union peripheral *const p,
const struct camera *const c)
{
- if (g->cb && g->cb->update && g->cb->update(g, p, c))
+ if (g->child && gui_update(g->child, p, c))
return -1;
- if (g->child && gui_update(g->child, p, c))
+ if (g->cb && g->cb->update && g->cb->update(g, p, c))
return -1;
for (struct gui_common *s = g->sibling; s; s = s->sibling)