gnome-settings-daemon/gnome-settings-daemon-more-power-button-actions.patch

27 lines
1.1 KiB
Diff
Raw Normal View History

Index: gnome-settings-daemon-45.0/data/gsd-enums.h
===================================================================
--- gnome-settings-daemon-45.0.orig/data/gsd-enums.h
+++ gnome-settings-daemon-45.0/data/gsd-enums.h
@@ -105,6 +105,7 @@ typedef enum
typedef enum
{
GSD_POWER_BUTTON_ACTION_NOTHING,
+ GSD_POWER_BUTTON_ACTION_SHUTDOWN,
GSD_POWER_BUTTON_ACTION_SUSPEND,
GSD_POWER_BUTTON_ACTION_HIBERNATE,
GSD_POWER_BUTTON_ACTION_INTERACTIVE
Index: gnome-settings-daemon-45.0/plugins/media-keys/gsd-media-keys-manager.c
===================================================================
--- gnome-settings-daemon-45.0.orig/plugins/media-keys/gsd-media-keys-manager.c
+++ gnome-settings-daemon-45.0/plugins/media-keys/gsd-media-keys-manager.c
@@ -2053,6 +2053,9 @@ do_config_power_button_action (GsdMediaK
}
switch (action_type) {
+ case GSD_POWER_BUTTON_ACTION_SHUTDOWN:
+ do_config_power_action (manager, GSD_POWER_ACTION_SHUTDOWN, in_lock_screen);
+ break;
case GSD_POWER_BUTTON_ACTION_SUSPEND:
action = GSD_POWER_ACTION_SUSPEND;
break;