diff options
| author | Joel Bodenmann <joel@unormal.org> | 2013-06-02 18:43:19 +0200 |
|---|---|---|
| committer | Joel Bodenmann <joel@unormal.org> | 2013-06-02 18:43:19 +0200 |
| commit | 809b8ccc60f16255d6c5b2b228a1463f2123ea4c (patch) | |
| tree | 8e0c39a1658a829204439a53ee182f0969a639e3 | |
| parent | 5b7ac841f386d4e281f0ae297a079aadcfc0f2a3 (diff) | |
| download | uGFX-809b8ccc60f16255d6c5b2b228a1463f2123ea4c.tar.gz uGFX-809b8ccc60f16255d6c5b2b228a1463f2123ea4c.tar.bz2 uGFX-809b8ccc60f16255d6c5b2b228a1463f2123ea4c.zip | |
GWIN checkbox fix
| -rw-r--r-- | include/gwin/checkbox.h | 1 | ||||
| -rw-r--r-- | src/gwin/checkbox.c | 11 |
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 |
