From 031e3a53569db5caf3f066323be99d4932f0bbdb Mon Sep 17 00:00:00 2001 From: Alessandro Iezzi Date: Mon, 29 May 2023 22:59:36 +0200 Subject: Call the draw function if the widget is invisible and not drawn yet --- src/widget.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/widget.c b/src/widget.c index d733727..c3007e1 100644 --- a/src/widget.c +++ b/src/widget.c @@ -58,6 +58,9 @@ void cherry_widget_set_visible(CherryWidget *widget, int visible) { widget->visible = visible; + + if (visible && widget->drawn == 0) + widget->draw(widget); } void -- cgit v1.2.3