net-ftp/proftpd: workaround missing auxillary argument to make openrc happy
[slyfox-gentoo.git] / x11-base / xorg-server / files / xorg-server-1.12.2-udev-input.patch
blob4ee7a1598a460614bdadb7367a3520b0fd78022b
1 From 85a9d58a68e788ee25919585ef92efa5933ded66 Mon Sep 17 00:00:00 2001
2 From: Sergei Trofimovich <slyfox@gentoo.org>
3 Date: Sun, 17 Jun 2012 22:24:16 +0300
4 Subject: [PATCH 1/2] config/udev: allow passing arbitrary configuration via
5 'ENV{x11_options.$opt}'
7 It is convenient to play with mouse/touchpad changes at runtime.
9 ENV{ID_INPUT_MOUSE}=="?*", ENV{x11_options.Emulate3Buttons}="True"
10 # replug the revice to see immediate effect
12 and consistent with hal's configuration scheme.
14 Original-patch: http://lists.debian.org/debian-x/2010/04/msg00320.html
15 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
16 ---
17 config/udev.c | 6 ++++++
18 1 files changed, 6 insertions(+), 0 deletions(-)
20 diff --git a/config/udev.c b/config/udev.c
21 index 1995184..35f682f 100644
22 --- a/config/udev.c
23 +++ b/config/udev.c
24 @@ -37,6 +37,8 @@
25 #include "os.h"
26 #include "globals.h"
29 +#define UDEV_X11_PROP_KEY "x11_options."
30 #define UDEV_XKB_PROP_KEY "xkb"
32 #define LOG_PROPERTY(path, prop, val) \
33 @@ -173,6 +175,10 @@ device_added(struct udev_device *udev_device)
34 else if (!strcasecmp(tmp, "options"))
35 input_options =
36 input_option_new(input_options, "xkb_options", value);
37 + } else if (!strncasecmp(key, UDEV_X11_PROP_KEY, sizeof(UDEV_X11_PROP_KEY) - 1)) {
38 + tmp = key + sizeof(UDEV_X11_PROP_KEY) - 1;
39 + input_options =
40 + input_option_new(input_options, tmp, value);
42 else if (!strcmp(key, "ID_VENDOR")) {
43 LOG_PROPERTY(path, key, value);
44 --
45 1.7.8.6