summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2021-02-26 17:09:16 +0100
committerUros Majstorovic <majstor@majstor.org>2021-02-26 17:09:16 +0100
commit5073075e39a1e35ab7408e3d325bf00a8e0a2230 (patch)
tree232728cd9165f445c692bf386bc029aaab0a6e9b
parent85a88a982f4688482da49d4d5d119ba659d4d870 (diff)
screen will not refresh if nobody claims touch event
-rw-r--r--fw/fe310/eos/eve/screen/screen.c4
-rw-r--r--fw/fe310/eos/eve/widget/selectw.c1
-rw-r--r--fw/fe310/eos/eve/widget/strw.c1
-rw-r--r--fw/fe310/eos/eve/widget/textw.c1
4 files changed, 5 insertions, 2 deletions
diff --git a/fw/fe310/eos/eve/screen/screen.c b/fw/fe310/eos/eve/screen/screen.c
index fa4a0aa..1099515 100644
--- a/fw/fe310/eos/eve/screen/screen.c
+++ b/fw/fe310/eos/eve/screen/screen.c
@@ -91,7 +91,7 @@ void eve_screen_draw(EVEScreen *screen) {
void eve_screen_handle_touch(void *s, uint8_t tag0, int touch_idx) {
EVEScreen *screen = s;
EVEWindow *win;
- int h;
+ int h = 0;
eve_touch_clear_opt();
@@ -106,5 +106,5 @@ void eve_screen_handle_touch(void *s, uint8_t tag0, int touch_idx) {
}
}
- eve_screen_draw(screen);
+ if (h) eve_screen_draw(screen);
}
diff --git a/fw/fe310/eos/eve/widget/selectw.c b/fw/fe310/eos/eve/widget/selectw.c
index 22e7474..432b5a4 100644
--- a/fw/fe310/eos/eve/widget/selectw.c
+++ b/fw/fe310/eos/eve/widget/selectw.c
@@ -94,6 +94,7 @@ int eve_selectw_touch(EVEWidget *_widget, EVEPage *page, EVETouch *t, uint16_t e
widget->select = i;
}
}
+ return 1;
}
return 0;
}
diff --git a/fw/fe310/eos/eve/widget/strw.c b/fw/fe310/eos/eve/widget/strw.c
index fe71b89..c96608d 100644
--- a/fw/fe310/eos/eve/widget/strw.c
+++ b/fw/fe310/eos/eve/widget/strw.c
@@ -158,6 +158,7 @@ int eve_strw_touch(EVEWidget *_widget, EVEPage *page, EVETouch *t, uint16_t evt)
eve_strw_cursor_set(widget, &widget->cursor1, eve_page_x(page, t->x0));
if (widget->cursor2.on) eve_strw_cursor_clear(widget, &widget->cursor2);
set_focus(widget, page);
+ ret = 1;
}
if (evt & EVE_TOUCH_ETYPE_TRACK_STOP) {
diff --git a/fw/fe310/eos/eve/widget/textw.c b/fw/fe310/eos/eve/widget/textw.c
index 62cbeff..20580dc 100644
--- a/fw/fe310/eos/eve/widget/textw.c
+++ b/fw/fe310/eos/eve/widget/textw.c
@@ -155,6 +155,7 @@ int eve_textw_touch(EVEWidget *_widget, EVEPage *page, EVETouch *t, uint16_t evt
eve_textw_cursor_set(widget, &widget->cursor1, t->tag_up, eve_page_x(page, t->x0));
if (widget->cursor2.on) eve_textw_cursor_clear(widget, &widget->cursor2);
set_focus(widget, &widget->cursor1, page);
+ ret = 1;
}
if (evt & EVE_TOUCH_ETYPE_TRACK_STOP) {