[gnome-power-manager/gnome-2-28] Help the kernel through its confusion



commit 2a18f4b0cd5e387435f336623bc3cc159fa298ec
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Oct 6 08:50:25 2009 -0400

    Help the kernel through its confusion
    
    If you talk to the kernel, 'suspend' sometimes means 'hibernate'.
    Just smile and wave...

 src/gpm-button.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/gpm-button.c b/src/gpm-button.c
index 85971b3..88ae542 100644
--- a/src/gpm-button.c
+++ b/src/gpm-button.c
@@ -324,7 +324,11 @@ gpm_button_init (GpmButton *button)
 	/* register the brightness keys */
 	gpm_button_xevent_key (button, XF86XK_PowerOff, GPM_BUTTON_POWER);
 #ifdef HAVE_XF86XK_SUSPEND
-	gpm_button_xevent_key (button, XF86XK_Suspend, GPM_BUTTON_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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]