aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/gwin/checkbox.h1
-rw-r--r--src/gwin/checkbox.c11
2 files changed, 11 insertions, 1 deletions
diff --git a/include/gwin/checkbox.h b/include/gwin/checkbox.h
index cfa9f646..0289a50a 100644
--- a/include/gwin/checkbox.h
+++ b/include/gwin/checkbox.h
@@ -38,7 +38,6 @@
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)
- bool_t state; // The state of the checkbox (selected or unselected)
} GEventGWinCheckbox;
typedef enum GCheckboxShape_e {
diff --git a/src/gwin/checkbox.c b/src/gwin/checkbox.c
index 1b70614b..a0d281c9 100644
--- a/src/gwin/checkbox.c
+++ b/src/gwin/checkbox.c
@@ -74,12 +74,23 @@ static void gwinCheckboxCallback(void *param, GEvent *pe) {
gwinCheckboxDraw((GHandle)param);
}
+ break;
#endif /* GFX_USE_GINPUT && GINPUT_NEED_MOUSE */
default:
return;
}
+ // Trigger a GWIN checkbox event
+ psl = 0;
+ while ((psl = geventGetSourceListener(gsh, psl))) {
+ if (!(pe = geventGetEventBuffer(psl)))
+ continue;
+ pbe->type = GEVENT_GWIN_CHECKBOX;
+ pbe->checkbox = gh;
+ geventSendEvent(psl);
+ }
+
#undef gh
#undef pbe
#undef pme