summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/eve/widget/strw.c
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2022-09-04 18:16:20 +0200
committerUros Majstorovic <majstor@majstor.org>2022-09-04 18:16:20 +0200
commitec0caa569b356f186e87c13e50550ca1b807dde6 (patch)
treeab07671a8aed9c573fe20d2d100be0ab1c5e68a7 /fw/fe310/eos/eve/widget/strw.c
parent7f8e473ac12191ca4449de96033e2acda07dc4c4 (diff)
eve support when i2s is running
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;
}