summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/eve/widget/strw.c
diff options
context:
space:
mode:
Diffstat (limited to 'fw/fe310/eos/eve/widget/strw.c')
-rw-r--r--fw/fe310/eos/eve/widget/strw.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fw/fe310/eos/eve/widget/strw.c b/fw/fe310/eos/eve/widget/strw.c
index ae9ccab..6bddbe9 100644
--- a/fw/fe310/eos/eve/widget/strw.c
+++ b/fw/fe310/eos/eve/widget/strw.c
@@ -81,7 +81,7 @@ void eve_strw_destroy(EVEWidget *_widget) {
eve_free(widget->str);
}
-static void set_focus(EVEStrWidget *widget) {
+static void show_rect(EVEStrWidget *widget) {
EVEWidget *_widget = &widget->w;
EVERect focus;
@@ -89,7 +89,7 @@ static void set_focus(EVEStrWidget *widget) {
focus.y = _widget->g.y;
focus.w = _widget->g.w;
focus.h = 2 * widget->font->h;
- eve_widget_set_focus(_widget, &focus);
+ eve_page_show_rect(_widget->page, &focus);
}
static EVEStrCursor *cursor_prox(EVEStrWidget *widget, EVEStrCursor *cursor, EVETouch *touch, short *dx) {
@@ -282,7 +282,7 @@ int eve_strw_touch(EVEWidget *_widget, EVETouch *touch, uint16_t evt) {
if ((evt & EVE_TOUCH_ETYPE_POINT_UP) && !(touch->eevt & (EVE_TOUCH_EETYPE_TRACK_XY | EVE_TOUCH_EETYPE_ABORT | EVE_TOUCH_EETYPE_LPRESS))) {
eve_strw_cursor_set(widget, &widget->cursor1, eve_page_x(page, touch->x0));
if (widget->cursor2.on) eve_strw_cursor_clear(widget, &widget->cursor2);
- set_focus(widget);
+ show_rect(widget);
ret = 1;
}
}
@@ -293,7 +293,6 @@ int eve_strw_touch(EVEWidget *_widget, EVETouch *touch, uint16_t evt) {
widget->track.dx = 0;
}
- if (ret) eve_widget_set_focus(_widget, NULL);
return ret;
}