summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/action.c3
-rw-r--r--apps/gui/bitmap/list.c18
2 files changed, 6 insertions, 15 deletions
diff --git a/apps/action.c b/apps/action.c
index 003f11f..ffb4195 100644
--- a/apps/action.c
+++ b/apps/action.c
@@ -192,6 +192,9 @@ static int get_action_worker(int context, int timeout,
{
if (button&BUTTON_REL)
{
+ /* remember the button for the below button eating on context
+ * change */
+ last_button = button;
wait_for_release = false;
}
return ACTION_NONE;
diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c
index 3da0d0b..2050043 100644
--- a/apps/gui/bitmap/list.c
+++ b/apps/gui/bitmap/list.c
@@ -640,21 +640,9 @@ unsigned gui_synclist_do_touchscreen(struct gui_synclist * gui_list)
&& !is_kinetic_over());
int icon_width = 0;
int line, list_width = list_text_vp->width;
- static bool wait_for_release = false;
released = (button&BUTTON_REL) != 0;
- if (released && wait_for_release)
- { /* was waiting on a release, reset everything so the next call
- * can start from new */
- wait_for_release = false;
- last_position = 0;
- if (scroll_mode == SCROLL_KINETIC)
- kinetic_force_stop();
- scroll_mode = SCROLL_NONE;
- return ACTION_NONE;
- }
-
if (button == ACTION_NONE || button == ACTION_UNKNOWN)
{
/* this happens when we hit edges of the list while kinetic scrolling,
@@ -760,13 +748,13 @@ unsigned gui_synclist_do_touchscreen(struct gui_synclist * gui_list)
return ACTION_NONE;
}
- if (button & BUTTON_REPEAT && scroll_mode == SCROLL_NONE
- && !wait_for_release)
+ if (button & BUTTON_REPEAT && scroll_mode == SCROLL_NONE)
{
/* held a single line for a while, bring up the context menu */
gui_synclist_select_item(gui_list, list_start_item + line);
/* don't sent context repeatedly */
- wait_for_release = true;
+ action_wait_for_release();
+ last_position = 0;
return ACTION_STD_CONTEXT;
}
if (released && !cancelled_kinetic)