diff options
-rw-r--r-- | apps/action.c | 3 | ||||
-rw-r--r-- | apps/gui/bitmap/list.c | 18 |
2 files changed, 6 insertions, 15 deletions
diff --git a/apps/action.c b/apps/action.c index 003f11faa8..ffb4195cc9 100644 --- a/apps/action.c +++ b/apps/action.c | |||
@@ -192,6 +192,9 @@ static int get_action_worker(int context, int timeout, | |||
192 | { | 192 | { |
193 | if (button&BUTTON_REL) | 193 | if (button&BUTTON_REL) |
194 | { | 194 | { |
195 | /* remember the button for the below button eating on context | ||
196 | * change */ | ||
197 | last_button = button; | ||
195 | wait_for_release = false; | 198 | wait_for_release = false; |
196 | } | 199 | } |
197 | return ACTION_NONE; | 200 | return ACTION_NONE; |
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) |