void-packages/srcpkgs/pbbuttonsd/patches/007-bug774634.patch

19 lines
866 B
Diff

Description: OnAC_KeyAction not implemented on Mac Mini G4
Author: Mathieu Malaterre <malat@debian.org>
Bug-Debian: http://bugs.debian.org/774634
Index: pbbuttonsd-0.8.1/src/module_pmac.c
===================================================================
--- pbbuttonsd-0.8.1.orig/src/module_pmac.c
+++ pbbuttonsd-0.8.1/src/module_pmac.c
@@ -552,7 +552,8 @@ pmac_pmu_handler (int fd, gpointer user_
/* n = 2 && intr[1] = 0x0c = %01100 power button on mac-mini */
/* n = 6 && intr[1] = 0x1c = %11100 if power button is pressed */
/* n = 6 && intr[1] = 0x15 = %10101 after cover close */
- if (n == 6 && ((intr[1] >> 3) & 1) != PBpressed) {
+ if ((n == 2 && intr[1] == 0x0c)
+ || (n == 6 && ((intr[1] >> 3) & 1) != PBpressed)) {
PBpressed = (intr[1] >> 3) & 1;
taglist_init (taglist);
taglist_add (taglist, TAG_KEYCODE, KEY_POWER);