summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormonsta <[email protected]>2017-02-01 11:50:21 +0300
committermonsta <[email protected]>2017-02-01 11:50:21 +0300
commit90daf672ae2eaea92767a485215ff2b487168200 (patch)
tree3a4b211956ea6f57b650d49ecd0e150621ebdc0b /src
parent862e9323ab67e149f0d2704b297218be13bfb037 (diff)
downloadmate-power-manager-90daf672ae2eaea92767a485215ff2b487168200.tar.bz2
mate-power-manager-90daf672ae2eaea92767a485215ff2b487168200.tar.xz
build: require xproto >= 7.0.15 and simplify some code
Diffstat (limited to 'src')
-rw-r--r--src/gpm-button.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gpm-button.c b/src/gpm-button.c
index cbf7f45..05a9eee 100644
--- a/src/gpm-button.c
+++ b/src/gpm-button.c
@@ -376,23 +376,18 @@ gpm_button_init (GpmButton *button)
#endif
/* register the brightness keys */
gpm_button_xevent_key (button, XF86XK_PowerOff, GPM_BUTTON_POWER);
-#ifdef HAVE_XF86XK_SUSPEND
+
/* The kernel messes up suspend/hibernate in some places. One of
* them is the key names. Unfortunately, they refuse to see the
* errors of their way in the name of 'compatibility'. Meh
*/
gpm_button_xevent_key (button, XF86XK_Suspend, GPM_BUTTON_HIBERNATE);
-#endif
gpm_button_xevent_key (button, XF86XK_Sleep, GPM_BUTTON_SUSPEND); /* should be configurable */
-#ifdef HAVE_XF86XK_HIBERNATE
gpm_button_xevent_key (button, XF86XK_Hibernate, GPM_BUTTON_HIBERNATE);
-#endif
gpm_button_xevent_key (button, XF86XK_MonBrightnessUp, GPM_BUTTON_BRIGHT_UP);
gpm_button_xevent_key (button, XF86XK_MonBrightnessDown, GPM_BUTTON_BRIGHT_DOWN);
gpm_button_xevent_key (button, XF86XK_ScreenSaver, GPM_BUTTON_LOCK);
-#ifdef HAVE_XF86XK_BATTERY
gpm_button_xevent_key (button, XF86XK_Battery, GPM_BUTTON_BATTERY);
-#endif
gpm_button_xevent_key (button, XF86XK_KbdBrightnessUp, GPM_BUTTON_KBD_BRIGHT_UP);
gpm_button_xevent_key (button, XF86XK_KbdBrightnessDown, GPM_BUTTON_KBD_BRIGHT_DOWN);
gpm_button_xevent_key (button, XF86XK_KbdLightOnOff, GPM_BUTTON_KBD_BRIGHT_TOGGLE);