diff options
-rw-r--r-- | configure.ac | 15 | ||||
-rw-r--r-- | src/gpm-button.c | 7 |
2 files changed, 3 insertions, 19 deletions
diff --git a/configure.ac b/configure.ac index 8bbf921..6012b1e 100644 --- a/configure.ac +++ b/configure.ac @@ -129,6 +129,7 @@ LIBNOTIFY_REQUIRED=0.7.0 CAIRO_REQUIRED=1.0.0 LIBPANEL_REQUIRED=1.17.0 XRANDR_REQUIRED=1.3.0 +XPROTO_REQUIRED=7.0.15 CANBERRA_REQUIRED=0.10 UPOWER_REQUIRED=0.9.5 @@ -154,25 +155,13 @@ PKG_CHECK_MODULES(GDK, [ PKG_CHECK_MODULES(X11, [ xrandr >= $XRANDR_REQUIRED - x11 xext xproto]) + x11 xext xproto >= XPROTO_REQUIRED]) PKG_CHECK_MODULES(LIBNOTIFY, libnotify >= $LIBNOTIFY_REQUIRED) PKG_CHECK_MODULES(UPOWER, upower-glib >= $UPOWER_REQUIRED) dnl --------------------------------------------------------------------------- -dnl - Check XF86XK_Keys -dnl --------------------------------------------------------------------------- -PKG_CHECK_EXISTS( - [xproto >= 7.0.14], - [AC_DEFINE(HAVE_XF86XK_BATTERY, 1, [Define if XF86XK_Battery is available])]) - -PKG_CHECK_EXISTS( - [xproto >= 7.0.15], - [AC_DEFINE(HAVE_XF86XK_SUSPEND, 1, [Define if XF86XK_Suspend is available]) - AC_DEFINE(HAVE_XF86XK_HIBERNATE, 1, [Define if XF86XK_Hibernate is available])]) - -dnl --------------------------------------------------------------------------- dnl - Make paths available for source files dnl --------------------------------------------------------------------------- AC_SUBST(SYSCONFDIR, $sysconfdir) 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); |