diff options
author | Andy Wingo <wingo@pobox.com> | 2016-03-17 09:21:53 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2016-03-17 09:22:03 +0100 |
commit | aec42acfb7b53f130f7e79441cf7bdd90ff54fe1 (patch) | |
tree | cfe490b72239c68169a36d062b1cdf6414427853 | |
parent | 880c6a277e6a1099dff0015330cec1cd79a1d36e (diff) |
Clear pending action after resume from delayed sleep.
-rw-r--r-- | src/login/logind-dbus.c | 7 |
1 files changed, 5 insertions, 2 deletions
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); |