summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/action.c7
-rw-r--r--firmware/drivers/button.c6
2 files changed, 9 insertions, 4 deletions
diff --git a/apps/action.c b/apps/action.c
index d61930a..003f11f 100644
--- a/apps/action.c
+++ b/apps/action.c
@@ -205,7 +205,12 @@ static int get_action_worker(int context, int timeout,
pcmbuf_beep(4000, KEYCLICK_DURATION, 2500*global_settings.keyclick);
#endif
- if ((context != last_context) && ((last_button & BUTTON_REL) == 0))
+ if ((context != last_context) && ((last_button & BUTTON_REL) == 0)
+#ifdef HAVE_SCROLLWHEEL
+ /* Scrollwheel doesn't generate release events */
+ && !(last_button & (BUTTON_SCROLL_BACK | BUTTON_SCROLL_FWD))
+#endif
+ )
{
if (button & BUTTON_REL)
{
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c
index 12a1ad0..403b521 100644
--- a/firmware/drivers/button.c
+++ b/firmware/drivers/button.c
@@ -115,13 +115,13 @@ static bool button_try_post(int button, int data)
/* one can swipe over the scren very quickly,
* for this to work we want to forget about old presses and
* only respect the very latest ones */
- const int force_post = true;
+ const bool force_post = true;
#else
/* Only post events if the queue is empty,
* to avoid afterscroll effects.
* i.e. don't post new buttons if previous ones haven't been
- * processed yet */
- const int force_post = false;
+ * processed yet - but always post releases */
+ const bool force_post = button & BUTTON_REL;
#endif
bool ret = queue_empty(&button_queue);