From 7db07282b9c5dc43709d4bb0005564b91bdc3a96 Mon Sep 17 00:00:00 2001 From: Alessandro Iezzi Date: Tue, 30 May 2023 16:44:05 +0200 Subject: Set drawn to 1 only if the widget is visible When called that function, the widget is set to drawn and remains drawn for all its life. --- src/widget.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/widget.c b/src/widget.c index b3b0307..224d691 100644 --- a/src/widget.c +++ b/src/widget.c @@ -7,6 +7,7 @@ static void cherry_widget_draw(CherryWidget *widget) { + if (cherry_widget_is_visible(*widget) == 0) return; widget->drawn = 1; } -- cgit v1.2.3