From aec42acfb7b53f130f7e79441cf7bdd90ff54fe1 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Thu, 17 Mar 2016 09:21:53 +0100 Subject: Clear pending action after resume from delayed sleep. --- src/login/logind-dbus.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 210e754809..5162cdf875 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -1456,8 +1456,11 @@ static int execute_shutdown_or_sleep( if (r < 0) return r; - /* And we're back. */ - send_prepare_for(m, w, false); + if (w == INHIBIT_SLEEP) + /* And we're back. */ + send_prepare_for(m, w, false); + + m->action_what = 0; /* Make sure the lid switch is ignored for a while (?) */ manager_set_lid_switch_ignore(m, now(CLOCK_MONOTONIC) + m->holdoff_timeout_usec); -- cgit v1.2.3-54-g00ecf