From 96a7ca6211d971a12292149514eab6f71f5a04cd Mon Sep 17 00:00:00 2001 From: "sh.pi" Date: Tue, 28 May 2013 21:56:15 +0900 Subject: [PATCH] LCD off operation by power key is ignored during volume down key is pressed. When force dump key is pressed, pm state is not changed to lcd off by power key. Change-Id: I09c7425440261a299428a6c66725413ca778a616 Signed-off-by: Krzysztof Sasiak --- src/display/key-filter.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/display/key-filter.c b/src/display/key-filter.c index f1d8c53..b33ece1 100644 --- a/src/display/key-filter.c +++ b/src/display/key-filter.c @@ -63,6 +63,7 @@ static Ecore_Timer *combination_timeout_id = NULL; static int cancel_lcdoff; static int key_combination = KEY_COMBINATION_STOP; static int powerkey_ignored = false; +static int volumedown_pressed = false; static inline int current_state_in_on(void) { @@ -142,7 +143,7 @@ static int process_power_key(struct input_event *pinput) switch (pinput->value) { case KEY_RELEASED: check_key_pair(pinput->code, pinput->value, &value); - if (current_state_in_on() && !cancel_lcdoff && + if (current_state_in_on() && !cancel_lcdoff && !volumedown_pressed && !(key_combination == KEY_COMBINATION_SCREENCAPTURE)) { check_processes(S_LCDOFF); check_processes(S_LCDDIM); @@ -233,12 +234,14 @@ static int process_volumedown_key(struct input_event *pinput) key_combination = KEY_COMBINATION_SCREENCAPTURE; ignore = false; } + volumedown_pressed = true; } else if (pinput->value == KEY_RELEASED) { if (key_combination != KEY_COMBINATION_SCREENCAPTURE) { stop_key_combination(); if (current_state_in_on()) ignore = false; } + volumedown_pressed = false; } return ignore; -- 2.7.4