From 23e2b56461609b36a2a0d7b13fb49e7e854cf689 Mon Sep 17 00:00:00 2001
From: Mooffie <mooffie@gmail.com>
Date: Sun, 6 Nov 2016 02:37:06 +0200
Subject: [PATCH] Ticket #3721: clean up radio widget's MSG_CURSOR.
---
lib/widget/radio.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/widget/radio.c b/lib/widget/radio.c
index 4568968..a4cc7c8 100644
a
|
b
|
radio_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d |
84 | 84 | { |
85 | 85 | case ' ': |
86 | 86 | r->sel = r->pos; |
87 | | widget_set_state (w, WST_FOCUSED, TRUE); |
| 87 | widget_set_state (w, WST_FOCUSED, TRUE); /* Also draws the widget. */ |
88 | 88 | return MSG_HANDLED; |
89 | 89 | |
90 | 90 | case KEY_UP: |
… |
… |
radio_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d |
92 | 92 | if (r->pos > 0) |
93 | 93 | { |
94 | 94 | r->pos--; |
| 95 | widget_redraw (w); |
95 | 96 | return MSG_HANDLED; |
96 | 97 | } |
97 | 98 | return MSG_NOT_HANDLED; |
… |
… |
radio_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d |
101 | 102 | if (r->count - 1 > r->pos) |
102 | 103 | { |
103 | 104 | r->pos++; |
| 105 | widget_redraw (w); |
104 | 106 | return MSG_HANDLED; |
105 | 107 | } |
106 | 108 | default: |
… |
… |
radio_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d |
108 | 110 | } |
109 | 111 | |
110 | 112 | case MSG_CURSOR: |
111 | | widget_set_state (w, WST_FOCUSED, TRUE); |
112 | 113 | widget_move (r, r->pos, 1); |
113 | 114 | return MSG_HANDLED; |
114 | 115 | |