summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Conrad <dconrad@fastmail.com>2021-03-19 19:13:58 -0500
committerWilliam Wilgus <me.theuser@yahoo.com>2021-03-20 03:10:52 +0000
commitd5676fcd90cc3278df173a71502dc04d74813883 (patch)
tree81ec488e8113d4e1d9a02b44aea0354e0405f8c6
parent775645e649aca4cccd8473de857deb19c5fcfb82 (diff)
downloadrockbox-d5676fcd90cc3278df173a71502dc04d74813883.tar.gz
rockbox-d5676fcd90cc3278df173a71502dc04d74813883.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.c9
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)
730 { 730 {
731 action = do_auto_softlock(last, cur); 731 action = do_auto_softlock(last, cur);
732 } 732 }
733
733 /* Lock/Unlock toggled by ACTION_STD_KEYLOCK presses*/ 734 /* Lock/Unlock toggled by ACTION_STD_KEYLOCK presses*/
734 if ((action == ACTION_STD_KEYLOCK) 735 if ((action == ACTION_STD_KEYLOCK)
735 || (last->keys_locked && last->unlock_combo == cur->button)) 736 || (last->keys_locked && last->unlock_combo == cur->button))
736 { 737 {
738#ifdef HAVE_BACKLIGHT
739 // if backlight is off and keys are unlocked, do nothing and exit.
740 // The backlight should come on without locking keypad.
741 if ((!last->keys_locked) && (!is_backlight_on(false)))
742 {
743 return;
744 }
745#endif
737 last->unlock_combo = cur->button; 746 last->unlock_combo = cur->button;
738 do_key_lock(!last->keys_locked); 747 do_key_lock(!last->keys_locked);
739 notify_user = true; 748 notify_user = true;