diff --git a/include/gwin/checkbox.h b/include/gwin/checkbox.h index 0289a50a..ba8f3b2f 100644 --- a/include/gwin/checkbox.h +++ b/include/gwin/checkbox.h @@ -36,8 +36,9 @@ /*===========================================================================*/ typedef struct GEventGWinCheckbox_t { - GEventType type; // The type of this event (GEVENT_GWIN_CHECKBOX) - GHandle checkbox; // The checkbox that has been depressed (actually triggered on release) + GEventType type; // The type of this event (GEVENT_GWIN_CHECKBOX) + GHandle checkbox; // The checkbox that has been depressed (actually triggered on release) + bool_t state // Is the checkbox currently checked or unchecked? } GEventGWinCheckbox; typedef enum GCheckboxShape_e { diff --git a/src/gwin/checkbox.c b/src/gwin/checkbox.c index a0d281c9..f12c0ee3 100644 --- a/src/gwin/checkbox.c +++ b/src/gwin/checkbox.c @@ -88,6 +88,7 @@ static void gwinCheckboxCallback(void *param, GEvent *pe) { continue; pbe->type = GEVENT_GWIN_CHECKBOX; pbe->checkbox = gh; + pbe->state = gbw->state; geventSendEvent(psl); }