diff options
author | 2023-05-29 22:49:11 +0200 | |
---|---|---|
committer | 2023-05-29 22:49:11 +0200 | |
commit | 076fe25f51308fc9222673ee2ef9cb8dca35d01c (patch) | |
tree | 3f86258131c9c92e8f0d026668cd21e4dc5b1dbf | |
parent | 8a3b72697817d7e3fe09cab94d2b348c2cb07f68 (diff) | |
download | cherry-076fe25f51308fc9222673ee2ef9cb8dca35d01c.tar.gz cherry-076fe25f51308fc9222673ee2ef9cb8dca35d01c.zip |
Add the `drawn` flag in CherryWidget
-rw-r--r-- | src/widget.c | 2 | ||||
-rw-r--r-- | src/widget.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/widget.c b/src/widget.c index af1f7f0..e74b707 100644 --- a/src/widget.c +++ b/src/widget.c @@ -1,11 +1,13 @@ /* See LICENSE file for copyright and license details. */ +#include <stdio.h> #include <stdlib.h> #include "widget.h" void cherry_widget_draw(CherryWidget *widget) { + widget->drawn = 1; } CherryWidget * diff --git a/src/widget.h b/src/widget.h index d0c005d..41fff22 100644 --- a/src/widget.h +++ b/src/widget.h @@ -5,7 +5,6 @@ #include <stdlib.h> /* used by utils.h until I'll fix that */ #include <utils.h> -#include "dimension.h" /* The parent of all widgets */ typedef struct CherryWidget { @@ -13,6 +12,7 @@ typedef struct CherryWidget { CherryDimension *dimension; /* Size of the widget */ int visible; /* Is this visible? */ list_t widgets; /* A list of children widgets */ + int drawn; /* Set to 1 when draw() is called */ /* Xlib stuff */ // XSizeHints hints; |