diff options
Diffstat (limited to 'plugins/tv/display/core.c')
-rw-r--r-- | plugins/tv/display/core.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/tv/display/core.c b/plugins/tv/display/core.c index 4cc0c462..7728cff2 100644 --- a/plugins/tv/display/core.c +++ b/plugins/tv/display/core.c @@ -819,7 +819,11 @@ static void del_state_cond(void *data, enum state_t state) del_node(state, tmp); set_unlock_time(pid, state); - if (!timeout_src_id) + /* Change state only when the two conditions below are satisfied. + * 1. There should be no running state-transition timer + * 2. Released lock is one of the pm_cur_state's lock + * This emulates already expired transition timer */ + if (!timeout_src_id && pm_cur_state == state) states[pm_cur_state].trans(EVENT_TIMEOUT); if (state == S_LCDOFF) |