diff options
author | Thomas Martitz <kugel@rockbox.org> | 2011-02-02 18:30:10 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2011-02-02 18:30:10 +0000 |
commit | 430ada08644336c3811c6188f1a1d91b1614efc2 (patch) | |
tree | 7ae0685f31a830532a557cb8cd5999bf8e2e2668 /apps/gui | |
parent | 48016d5e07e2b5aff1c1044b4b299b7e7138156a (diff) | |
download | rockbox-430ada08644336c3811c6188f1a1d91b1614efc2.tar.gz rockbox-430ada08644336c3811c6188f1a1d91b1614efc2.zip |
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')
-rw-r--r-- | apps/gui/bitmap/list.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c index 3da0d0bb7f..2050043787 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) | |||
640 | && !is_kinetic_over()); | 640 | && !is_kinetic_over()); |
641 | int icon_width = 0; | 641 | int icon_width = 0; |
642 | int line, list_width = list_text_vp->width; | 642 | int line, list_width = list_text_vp->width; |
643 | static bool wait_for_release = false; | ||
644 | 643 | ||
645 | released = (button&BUTTON_REL) != 0; | 644 | released = (button&BUTTON_REL) != 0; |
646 | 645 | ||
647 | if (released && wait_for_release) | ||
648 | { /* was waiting on a release, reset everything so the next call | ||
649 | * can start from new */ | ||
650 | wait_for_release = false; | ||
651 | last_position = 0; | ||
652 | if (scroll_mode == SCROLL_KINETIC) | ||
653 | kinetic_force_stop(); | ||
654 | scroll_mode = SCROLL_NONE; | ||
655 | return ACTION_NONE; | ||
656 | } | ||
657 | |||
658 | if (button == ACTION_NONE || button == ACTION_UNKNOWN) | 646 | if (button == ACTION_NONE || button == ACTION_UNKNOWN) |
659 | { | 647 | { |
660 | /* this happens when we hit edges of the list while kinetic scrolling, | 648 | /* 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) | |||
760 | return ACTION_NONE; | 748 | return ACTION_NONE; |
761 | } | 749 | } |
762 | 750 | ||
763 | if (button & BUTTON_REPEAT && scroll_mode == SCROLL_NONE | 751 | if (button & BUTTON_REPEAT && scroll_mode == SCROLL_NONE) |
764 | && !wait_for_release) | ||
765 | { | 752 | { |
766 | /* held a single line for a while, bring up the context menu */ | 753 | /* held a single line for a while, bring up the context menu */ |
767 | gui_synclist_select_item(gui_list, list_start_item + line); | 754 | gui_synclist_select_item(gui_list, list_start_item + line); |
768 | /* don't sent context repeatedly */ | 755 | /* don't sent context repeatedly */ |
769 | wait_for_release = true; | 756 | action_wait_for_release(); |
757 | last_position = 0; | ||
770 | return ACTION_STD_CONTEXT; | 758 | return ACTION_STD_CONTEXT; |
771 | } | 759 | } |
772 | if (released && !cancelled_kinetic) | 760 | if (released && !cancelled_kinetic) |