[gpm] [patch] DTRT for buttons on stemming keyboards



Hi,

Without this patch g-p-m won't put my system to sleep when I press the
Sleep button on my multimedia keyboard.

    David

 ChangeLog             |    7 +++++++
 src/gpm-hal-monitor.c |    5 +++++
 2 files changed, 12 insertions(+)

? g-p-m-honour-keypresses.patch
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-power-manager/ChangeLog,v
retrieving revision 1.345
diff -u -p -r1.345 ChangeLog
--- ChangeLog	16 Feb 2006 20:23:02 -0000	1.345
+++ ChangeLog	18 Feb 2006 01:05:28 -0000
@@ -1,3 +1,10 @@
+2006-02-17  David Zeuthen  <davidz redhat com>
+
+	* src/gpm-hal-monitor.c (watch_device_condition): Use details if
+	the button type is the empty string. Makes g-p-m do the right
+	thing if I'm pressing the Sleep button on my keyboard (thanks to
+	the hal patch from Matthew Garrett).
+
 2006-02-16  Richard Hughes  <richard hughsie com>
 
 	* configure.in: Add --enable-actions-menu=foo so we can disable the
Index: src/gpm-hal-monitor.c
===================================================================
RCS file: /cvs/gnome/gnome-power-manager/src/gpm-hal-monitor.c,v
retrieving revision 1.14
diff -u -p -r1.14 gpm-hal-monitor.c
--- src/gpm-hal-monitor.c	14 Feb 2006 00:00:05 -0000	1.14
+++ src/gpm-hal-monitor.c	18 Feb 2006 01:05:29 -0000
@@ -306,6 +306,11 @@ watch_device_condition (DBusGProxy    *p
 			return;
 		}
 
+		if (strcmp (type, "") == 0) {
+			if (details != NULL)
+				type = g_strdup (details);
+		}
+
 		gpm_debug ("ButtonPressed : %s", type);
 
 		if (strcmp (type, "power") == 0) {


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