From ef71629a65f6e8052d66775f07b079bf08322476 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 25 Jan 2013 00:06:28 -0800 Subject: Fri Jan 25 00:06:28 PST 2013 --- ...x-format-of-video-tabletmode-event-string.patch | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 community/acpid/0001-Fix-format-of-video-tabletmode-event-string.patch (limited to 'community/acpid/0001-Fix-format-of-video-tabletmode-event-string.patch') diff --git a/community/acpid/0001-Fix-format-of-video-tabletmode-event-string.patch b/community/acpid/0001-Fix-format-of-video-tabletmode-event-string.patch new file mode 100644 index 000000000..d111214d3 --- /dev/null +++ b/community/acpid/0001-Fix-format-of-video-tabletmode-event-string.patch @@ -0,0 +1,45 @@ +From ddf5be1f8fc35c38dc241ca935bf4d408f2ff61d Mon Sep 17 00:00:00 2001 +From: Ted Felix +Date: Thu, 17 Jan 2013 20:03:54 -0500 +Subject: [PATCH] Fix format of video/tabletmode event string + +The previous format caused Xorg's xserver to crash in +lnxACPIGetEventFromOs() because it doesn't check for NULL +returns from strtok(). +--- + input_layer.c | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/input_layer.c b/input_layer.c +index 591ad64..db410c0 100644 +--- a/input_layer.c ++++ b/input_layer.c +@@ -56,6 +56,14 @@ struct evtab_entry { + evtest.c, acpi_genl, or kacpimon to find new events to add to this + table. */ + ++/* ++ * The two numbers (e.g. "00000080 00000000") in each string is a format ++ * that Xorg and maybe others expect. ++ * ++ * See hw/xfree86/os-support/linux/lnx_acpi.c in xserver and specifically ++ * lnxACPIGetEventFromOs(). ++ */ ++ + static struct evtab_entry evtab[] = { + + /*** COMMON EVENTS ***/ +@@ -66,8 +74,8 @@ static struct evtab_entry evtab[] = { + {{{0,0}, EV_KEY, KEY_SLEEP, 1}, "button/sleep SBTN 00000080 00000000"}, + {{{0,0}, EV_SW, SW_LID, 1}, "button/lid LID close"}, + {{{0,0}, EV_SW, SW_LID, 0}, "button/lid LID open"}, +- {{{0,0}, EV_SW, SW_TABLET_MODE, 0}, "video/tabletmode TBLT off"}, +- {{{0,0}, EV_SW, SW_TABLET_MODE, 1}, "video/tabletmode TBLT on"}, ++ {{{0,0}, EV_SW, SW_TABLET_MODE, 0}, "video/tabletmode TBLT 0000008A 00000000"}, ++ {{{0,0}, EV_SW, SW_TABLET_MODE, 1}, "video/tabletmode TBLT 0000008A 00000001"}, + + + /*** VIDEO ***/ +-- +1.8.1.1 + -- cgit v1.2.3-54-g00ecf