aboutsummaryrefslogtreecommitdiffstats
path: root/src/gwin/gwin_checkbox.c
diff options
context:
space:
mode:
authorinmarket <inmarket@ugfx.org>2016-08-24 17:48:41 +1000
committerinmarket <inmarket@ugfx.org>2016-08-24 17:48:41 +1000
commit8603afd3098b5fdb640cb214bda209137fe192ee (patch)
treefade878ced28b4c4e93e8894a5886658067d71fc /src/gwin/gwin_checkbox.c
parentea0419c29bc4aed1b60662d781d94382dcb8e336 (diff)
downloaduGFX-8603afd3098b5fdb640cb214bda209137fe192ee.tar.gz
uGFX-8603afd3098b5fdb640cb214bda209137fe192ee.tar.bz2
uGFX-8603afd3098b5fdb640cb214bda209137fe192ee.zip
Fix keyboard handling for gwin checkbox and button
Diffstat (limited to 'src/gwin/gwin_checkbox.c')
-rw-r--r--src/gwin/gwin_checkbox.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gwin/gwin_checkbox.c b/src/gwin/gwin_checkbox.c
index 436a0806..1160f0b1 100644
--- a/src/gwin/gwin_checkbox.c
+++ b/src/gwin/gwin_checkbox.c
@@ -56,16 +56,15 @@ static void SendCheckboxEvent(GWidgetObject *gw) {
static void CheckboxKeyboard(GWidgetObject* gw, GEventKeyboard* pke)
{
// Only react on KEYDOWN events. Ignore KEYUP events.
- if (pke->keystate & GKEYSTATE_KEYUP) {
+ if ((pke->keystate & GKEYSTATE_KEYUP))
return;
- }
// ENTER and SPACE keys to check/uncheck the checkbox
if (pke->c[0] == GKEY_ENTER || pke->c[0] == GKEY_SPACE) {
gw->g.flags ^= GCHECKBOX_FLG_CHECKED;
+ _gwinUpdate((GHandle)gw);
+ SendCheckboxEvent(gw);
}
-
- _gwinUpdate((GHandle)gw);
}
#endif