From 90daf672ae2eaea92767a485215ff2b487168200 Mon Sep 17 00:00:00 2001 From: monsta Date: Wed, 1 Feb 2017 11:50:21 +0300 Subject: build: require xproto >= 7.0.15 and simplify some code --- src/gpm-button.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src') 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); -- cgit v1.2.1