From f6861e43015398eb9d05ea528edb958fe1a55fcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Wed, 12 Dec 2018 11:28:28 +0100 Subject: [PATCH] [apps] Fix SuspendTimer::Fire that caused two suspensions --- apps/suspend_timer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/suspend_timer.cpp b/apps/suspend_timer.cpp index 942620a41..4984be1cf 100644 --- a/apps/suspend_timer.cpp +++ b/apps/suspend_timer.cpp @@ -8,7 +8,9 @@ SuspendTimer::SuspendTimer(AppsContainer * container) : } bool SuspendTimer::fire() { + /* We could just call m_container->suspend(), but we want to notify all + * responders in the responder chain that the calculator will be switched off, + * so we use an event to switch off the calculator. */ m_container->dispatchEvent(Ion::Events::OnOff); - m_container->suspend(); return false; }