diff options
author | Dana Conrad <dconrad@fastmail.com> | 2021-03-19 19:13:58 -0500 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2021-03-20 03:10:52 +0000 |
commit | d5676fcd90cc3278df173a71502dc04d74813883 (patch) | |
tree | 81ec488e8113d4e1d9a02b44aea0354e0405f8c6 | |
parent | 775645e649aca4cccd8473de857deb19c5fcfb82 (diff) | |
download | rockbox-d5676fcd90.tar.gz rockbox-d5676fcd90.zip |
If backlight is off and keys are unlocked, power button wakes screen only
tested on erosq
On devices with both a backlight and a softlock button, currently
pressing the softlock button while the screen is off and the keypad is
unlocked will wake the screen and also lock the keypad. Presumably, the
user's intention is to use the device when they hit the softlock button
in this state, so wake the screen without locking the keypad.
Change-Id: Ib00e1c37142e5d3d9317775de5cf0dd67f3f2569
-rw-r--r-- | apps/action.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/action.c b/apps/action.c index d2fef6f513..858a761219 100644 --- a/apps/action.c +++ b/apps/action.c @@ -730,10 +730,19 @@ static inline void do_softlock(action_last_t *last, action_cur_t *cur) { action = do_auto_softlock(last, cur); } + /* Lock/Unlock toggled by ACTION_STD_KEYLOCK presses*/ if ((action == ACTION_STD_KEYLOCK) || (last->keys_locked && last->unlock_combo == cur->button)) { +#ifdef HAVE_BACKLIGHT + // if backlight is off and keys are unlocked, do nothing and exit. + // The backlight should come on without locking keypad. + if ((!last->keys_locked) && (!is_backlight_on(false))) + { + return; + } +#endif last->unlock_combo = cur->button; do_key_lock(!last->keys_locked); notify_user = true; |