aboutsummaryrefslogtreecommitdiff
path: root/src/widget.c
diff options
context:
space:
mode:
authorAlessandro Iezzi <aiezzi@alessandroiezzi.it>2023-05-30 16:44:05 +0200
committerAlessandro Iezzi <aiezzi@alessandroiezzi.it>2023-05-30 16:44:05 +0200
commit7db07282b9c5dc43709d4bb0005564b91bdc3a96 (patch)
treed5c5b79a8089c312eb1acf40194a006655b5c29b /src/widget.c
parentbe230dfdb78f70d6632c5c263b3d3c7bbb477a1a (diff)
downloadcherry-7db07282b9c5dc43709d4bb0005564b91bdc3a96.tar.gz
cherry-7db07282b9c5dc43709d4bb0005564b91bdc3a96.zip
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.
Diffstat (limited to 'src/widget.c')
-rw-r--r--src/widget.c1
1 files changed, 1 insertions, 0 deletions
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;
}