diff options
author | Bastien Nocera <hadess@hadess.net> | 2015-11-10 12:54:16 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2015-11-10 13:07:12 +0100 |
commit | 8c403d8ac4c087947ebc2c8a7cca17b9a1ae4698 (patch) | |
tree | 4bfc475a92573c135b66c77c2337b770ec49c36c | |
parent | 329594958f94f3917f30ecc581419b1392839e12 (diff) | |
download | gnome-settings-daemon-8c403d8ac4c087947ebc2c8a7cca17b9a1ae4698.tar.gz |
media-keys: Suspend when power key is pressed on tablets
https://bugzilla.gnome.org/show_bug.cgi?id=755953
-rw-r--r-- | plugins/media-keys/gsd-media-keys-manager.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c index e099bc80..917b47c2 100644 --- a/plugins/media-keys/gsd-media-keys-manager.c +++ b/plugins/media-keys/gsd-media-keys-manager.c @@ -1841,6 +1841,12 @@ do_config_power_button_action (GsdMediaKeysManager *manager, return; } + /* Always suspend tablets */ + if (g_strcmp0 (manager->priv->chassis_type, "tablet") == 0) { + power_action (manager, "Suspend", !in_lock_screen); + return; + } + action_type = g_settings_get_enum (manager->priv->power_settings, "power-button-action"); switch (action_type) { case GSD_POWER_BUTTON_ACTION_SUSPEND: |