diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-09-19 13:10:10 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-09-19 13:10:10 +0200 |
commit | beaafb2ea6be591882aef21fe19b88e3b2461087 (patch) | |
tree | a61b375510b84f6b43bccfde4bbe0d46372aece5 /src/login/logind-inhibit.h | |
parent | 468b21de7c9327bb8747d36e6273ed7aed97052a (diff) |
logind: rework power key/suspend key/lid switch handling
http://lists.freedesktop.org/archives/systemd-devel/2012-September/006604.html
https://bugzilla.gnome.org/show_bug.cgi?id=680689
This changes the meaning of the
HandlePowerKey=/HandleSleepKey=/HandleLidSwitch= setting of logind.conf
Diffstat (limited to 'src/login/logind-inhibit.h')
-rw-r--r-- | src/login/logind-inhibit.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/login/logind-inhibit.h b/src/login/logind-inhibit.h index e72536f2ac..d89a1b36af 100644 --- a/src/login/logind-inhibit.h +++ b/src/login/logind-inhibit.h @@ -31,7 +31,10 @@ typedef enum InhibitWhat { INHIBIT_SHUTDOWN = 1, INHIBIT_SLEEP = 2, INHIBIT_IDLE = 4, - _INHIBIT_WHAT_MAX = 8, + INHIBIT_HANDLE_POWER_KEY = 8, + INHIBIT_HANDLE_SLEEP_KEY = 16, + INHIBIT_HANDLE_LID_SWITCH = 32, + _INHIBIT_WHAT_MAX = 64, _INHIBIT_WHAT_INVALID = -1 } InhibitWhat; @@ -80,7 +83,7 @@ int inhibitor_create_fifo(Inhibitor *i); void inhibitor_remove_fifo(Inhibitor *i); InhibitWhat manager_inhibit_what(Manager *m, InhibitMode mm); -bool manager_is_inhibited(Manager *m, InhibitWhat w, InhibitMode mm, dual_timestamp *since); +bool manager_is_inhibited(Manager *m, InhibitWhat w, InhibitMode mm, dual_timestamp *since, bool only_active); const char *inhibit_what_to_string(InhibitWhat k); InhibitWhat inhibit_what_from_string(const char *s); |