Clarify send of MSG_NOTIFY.

(check_callback): update widget itself, then send MSG_NOTIFY to owner.
(radio_callback): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2016-02-21 10:05:43 +03:00
parent 4e62be3b7e
commit 8c9f359e89
2 changed files with 3 additions and 3 deletions

View File

@ -76,8 +76,8 @@ check_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d
return MSG_NOT_HANDLED;
c->state ^= C_BOOL;
c->state ^= C_CHANGE;
send_message (WIDGET (w)->owner, w, MSG_NOTIFY, 0, NULL);
send_message (w, sender, MSG_FOCUS, ' ', data);
send_message (WIDGET (w)->owner, w, MSG_NOTIFY, 0, NULL);
return MSG_HANDLED;
case MSG_CURSOR:

View File

@ -85,8 +85,8 @@ radio_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d
{
case ' ':
r->sel = r->pos;
send_message (w->owner, w, MSG_NOTIFY, 0, NULL);
send_message (w, sender, MSG_FOCUS, ' ', data);
send_message (w->owner, w, MSG_NOTIFY, 0, NULL);
return MSG_HANDLED;
case KEY_UP:
@ -110,9 +110,9 @@ radio_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d
}
case MSG_CURSOR:
send_message (w->owner, w, MSG_NOTIFY, 0, NULL);
send_message (w, sender, MSG_FOCUS, ' ', data);
widget_move (r, r->pos, 1);
send_message (w->owner, w, MSG_NOTIFY, 0, NULL);
return MSG_HANDLED;
case MSG_UNFOCUS: