diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-09-21 15:44:14 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-09-21 15:44:14 +0200 |
commit | 8e7fd6ade44ce5dde0867ba748c7978ed1206865 (patch) | |
tree | ced70d8e4c3d4e14f70ac459277c9046bd26500c /src/login/logind.c | |
parent | 636d30a0895f17eca8313d50f9b2fc1ec5e128da (diff) |
logind: split up HandleSleepKey= into HandleSuspendKey= and HandleHibernateKey=
The kernel and X11 distuingish these two, and Thinkpad keys have both,
hence we really should distinguish them too.
Diffstat (limited to 'src/login/logind.c')
-rw-r--r-- | src/login/logind.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/login/logind.c b/src/login/logind.c index ccd18b9898..9cce481340 100644 --- a/src/login/logind.c +++ b/src/login/logind.c @@ -56,7 +56,8 @@ Manager *manager_new(void) { m->reserve_vt = 6; m->inhibit_delay_max = 5 * USEC_PER_SEC; m->handle_power_key = HANDLE_POWEROFF; - m->handle_sleep_key = HANDLE_SUSPEND; + m->handle_suspend_key = HANDLE_SUSPEND; + m->handle_hibernate_key = HANDLE_HIBERNATE; m->handle_lid_switch = HANDLE_SUSPEND; m->lid_switch_ignore_inhibited = true; @@ -496,7 +497,8 @@ int manager_enumerate_buttons(Manager *m) { /* Loads buttons from udev */ if (m->handle_power_key == HANDLE_IGNORE && - m->handle_sleep_key == HANDLE_IGNORE && + m->handle_suspend_key == HANDLE_IGNORE && + m->handle_hibernate_key == HANDLE_IGNORE && m->handle_lid_switch == HANDLE_IGNORE) return 0; @@ -1306,7 +1308,8 @@ static int manager_connect_udev(Manager *m) { /* Don't watch keys if nobody cares */ if (m->handle_power_key != HANDLE_IGNORE || - m->handle_sleep_key != HANDLE_IGNORE || + m->handle_suspend_key != HANDLE_IGNORE || + m->handle_hibernate_key != HANDLE_IGNORE || m->handle_lid_switch != HANDLE_IGNORE) { m->udev_button_monitor = udev_monitor_new_from_netlink(m->udev, "udev"); |