diff options
author | Dana Conrad <dconrad@fastmail.com> | 2021-06-06 13:33:03 -0500 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2021-06-12 21:11:28 +0000 |
commit | c067b344e8da0c9b6a9b785100661f598f64a5d3 (patch) | |
tree | b58da29a4ee4dfa097586b6c4b1411b9f4ecda01 | |
parent | f3f9d1fb9533529776ded4fd3af7fd274ba5f2fe (diff) | |
download | rockbox-c067b344e8da0c9b6a9b785100661f598f64a5d3.tar.gz rockbox-c067b344e8da0c9b6a9b785100661f598f64a5d3.zip |
FS#13297: M3K Autolock allows one action before disabling touchpad
Intercept buttonpress and action, and nullify both if the button
is part of the touchpad. Only affects autolock functionality.
Adding removal of note about autolock in the manual - the lock
button no longer needs to be pressed at least once to prime
the autolock, if enabled, since commit 14f7a95
Change-Id: Ic3582764df490d96abc2d78116f23cbe0fdd6173
-rw-r--r-- | apps/action.c | 14 | ||||
-rwxr-xr-x | manual/configure_rockbox/system_options.tex | 2 |
2 files changed, 14 insertions, 2 deletions
diff --git a/apps/action.c b/apps/action.c index 15422f987b..5533c00241 100644 --- a/apps/action.c +++ b/apps/action.c | |||
@@ -683,6 +683,20 @@ static inline int do_auto_softlock(action_last_t *last, action_cur_t *cur) | |||
683 | if (is_timeout) | 683 | if (is_timeout) |
684 | { | 684 | { |
685 | do_key_lock(true); | 685 | do_key_lock(true); |
686 | |||
687 | #if defined(HAVE_TOUCHPAD) | ||
688 | /* if the touchpad is supposed to be off and the current buttonpress | ||
689 | * is from the touchpad, nullify both button and action. */ | ||
690 | if (!has_flag(action_last.softlock_mask, SEL_ACTION_ENABLED) || | ||
691 | has_flag(action_last.softlock_mask, SEL_ACTION_NOTOUCH)) | ||
692 | { | ||
693 | cur->button = touchpad_filter(cur->button); | ||
694 | if (cur->button == BUTTON_NONE) | ||
695 | { | ||
696 | action = ACTION_NONE; | ||
697 | } | ||
698 | } | ||
699 | #endif | ||
686 | } | 700 | } |
687 | else if (action == ACTION_STD_KEYLOCK) | 701 | else if (action == ACTION_STD_KEYLOCK) |
688 | { | 702 | { |
diff --git a/manual/configure_rockbox/system_options.tex b/manual/configure_rockbox/system_options.tex index 59acdaa5f9..32c389e593 100755 --- a/manual/configure_rockbox/system_options.tex +++ b/manual/configure_rockbox/system_options.tex | |||
@@ -289,8 +289,6 @@ therefore result in better runtime. | |||
289 | list above. The device can be locked and unlocked manually, but | 289 | list above. The device can be locked and unlocked manually, but |
290 | the lock will always engage when the backlight turns off. Requires | 290 | the lock will always engage when the backlight turns off. Requires |
291 | Autolock On to be enabled. | 291 | Autolock On to be enabled. |
292 | \note{The lock button must be pressed at least once after enabling | ||
293 | this setting and at least once every time the device is powered up.} | ||
294 | } %\opt{HAVE_BACKLIGHT} | 292 | } %\opt{HAVE_BACKLIGHT} |
295 | \opt{touchpad}{ | 293 | \opt{touchpad}{ |
296 | \item[Disable Touch.] | 294 | \item[Disable Touch.] |