summaryrefslogtreecommitdiff
path: root/apps/gui/bitmap
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2011-02-02 18:30:10 +0000
committerThomas Martitz <kugel@rockbox.org>2011-02-02 18:30:10 +0000
commit430ada08644336c3811c6188f1a1d91b1614efc2 (patch)
tree7ae0685f31a830532a557cb8cd5999bf8e2e2668 /apps/gui/bitmap
parent48016d5e07e2b5aff1c1044b4b299b7e7138156a (diff)
downloadrockbox-430ada08644336c3811c6188f1a1d91b1614efc2.zip
rockbox-430ada08644336c3811c6188f1a1d91b1614efc2.tar.gz
rockbox-430ada08644336c3811c6188f1a1d91b1614efc2.tar.bz2
rockbox-430ada08644336c3811c6188f1a1d91b1614efc2.tar.xz
Redo r29168. Use similar but existing mechanism in the action system which seems to work better.
Don't eat buttons on context change if it was waiting for button release (you did need another release). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29192 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/bitmap')
-rw-r--r--apps/gui/bitmap/list.c18
1 files changed, 3 insertions, 15 deletions
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)