diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2022-07-15 01:01:04 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2022-07-15 01:03:36 +0200 |
| commit | 96dbdea21ee003de17c04ea4aedad57574b64e4f (patch) | |
| tree | ddc7ab9a0a3ed780d9df5fde15eef92d18a43bb8 | |
| parent | 1ea5a4d4a42addfa86735050e9b513f9c9cb3d62 (diff) | |
gui: Update elements in reverse order
This allows to calculate dimensions for containers with children
containers in it.
| -rw-r--r-- | src/gui/src/gui.c | 4 |
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) |
