summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-graphics/xorg-driver
diff options
context:
space:
mode:
authorSimon Busch <morphis@gravedo.de>2011-10-10 11:46:53 +0200
committerKoen Kooi <koen@dominion.thruhere.net>2011-10-12 13:02:55 +0200
commit19ebb4bda5fe83f00602db716039ce74ab38eee2 (patch)
tree83c684b2b59e83582c2f9b3bdefcd32c47e3a6de /meta-oe/recipes-graphics/xorg-driver
parent4be8fa4e01b089430dced7d386ad37d12acffb43 (diff)
downloadmeta-openembedded-19ebb4bda5fe83f00602db716039ce74ab38eee2.tar.gz
meta-oe: xf86-input-mtev: add intial recipe for a multitouch input driver
Signed-off-by: Denis Carikli <denis@eukrea.com> Signed-off-by: Simon Busch <morphis@gravedo.de> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-graphics/xorg-driver')
-rw-r--r--meta-oe/recipes-graphics/xorg-driver/xf86-input-mtev/fix-it.patch153
-rw-r--r--meta-oe/recipes-graphics/xorg-driver/xf86-input-mtev_git.bb21
2 files changed, 174 insertions, 0 deletions
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-input-mtev/fix-it.patch b/meta-oe/recipes-graphics/xorg-driver/xf86-input-mtev/fix-it.patch
new file mode 100644
index 000000000..771a2a8e1
--- /dev/null
+++ b/meta-oe/recipes-graphics/xorg-driver/xf86-input-mtev/fix-it.patch
@@ -0,0 +1,153 @@
1diff --git a/src/multitouch.c b/src/multitouch.c
2index c55d742..4a8192d 100644
3--- a/src/multitouch.c
4+++ b/src/multitouch.c
5@@ -114,7 +114,7 @@ static int init_properties(DeviceIntPtr dev)
6 return Success;
7 }
8
9-static int device_init(DeviceIntPtr dev, LocalDevicePtr local)
10+static int device_init(DeviceIntPtr dev, InputInfoPtr local)
11 {
12 struct mtev_mtouch *mt = local->private;
13 Atom atom;
14@@ -222,7 +222,7 @@ static int device_init(DeviceIntPtr dev, LocalDevicePtr local)
15 xf86InitValuatorAxisStruct(dev, val, axes_labels[val],
16 min,
17 max,
18- 1, 0, 1);
19+ 1, 0, 1,Absolute);
20 xf86InitValuatorDefaults(dev, val);
21 }
22 }
23@@ -232,7 +232,7 @@ static int device_init(DeviceIntPtr dev, LocalDevicePtr local)
24 return Success;
25 }
26
27-static int device_on(LocalDevicePtr local)
28+static int device_on(InputInfoPtr local)
29 {
30 struct mtev_mtouch *mt = local->private;
31 local->fd = xf86OpenSerial(local->options);
32@@ -248,7 +248,7 @@ static int device_on(LocalDevicePtr local)
33 return Success;
34 }
35
36-static int device_off(LocalDevicePtr local)
37+static int device_off(InputInfoPtr local)
38 {
39 struct mtev_mtouch *mt = local->private;
40 xf86RemoveEnabledDevice(local);
41@@ -259,12 +259,12 @@ static int device_off(LocalDevicePtr local)
42 return Success;
43 }
44
45-static int device_close(LocalDevicePtr local)
46+static int device_close(InputInfoPtr local)
47 {
48 return Success;
49 }
50
51-static void process_state(LocalDevicePtr local,
52+static void process_state(InputInfoPtr local,
53 const struct mtev_mtouch *mt)
54 {
55
56@@ -321,22 +321,22 @@ static void process_state(LocalDevicePtr local,
57 }
58
59 /* Some x-clients assume they get motion events before button down */
60+ xf86Msg(X_INFO,"down %d|pdown %d\n", down, pdown);
61 if (down)
62 xf86PostMotionEventP(local->dev, TRUE,
63 0, down * MT_AXIS_PER_FINGER, valuators);
64-
65 if(down && pdown == 0)
66 xf86PostButtonEventP(local->dev, TRUE,
67 1, 1,
68 0, down * MT_AXIS_PER_FINGER, valuators);
69- else if (down == 0 && pdown)
70- xf86PostButtonEvent(local->dev, TRUE, 1, 0, 0, 0);
71-
72+ else if (down == 0 && pdown){
73+ xf86PostButtonEvent(local->dev, TRUE, 1, 1, 0, 0);
74+ }
75 pdown = !!down;
76 }
77
78 /* called for each full received packet from the touchpad */
79-static void read_input(LocalDevicePtr local)
80+static void read_input(InputInfoPtr local)
81 {
82 struct mtev_mtouch *mt = local->private;
83 while (mtouch_read_synchronized_event(mt, local->fd)) {
84@@ -346,7 +346,7 @@ static void read_input(LocalDevicePtr local)
85
86 static Bool device_control(DeviceIntPtr dev, int mode)
87 {
88- LocalDevicePtr local = dev->public.devicePrivate;
89+ InputInfoPtr local = dev->public.devicePrivate;
90 switch (mode) {
91 case DEVICE_INIT:
92 xf86Msg(X_INFO, "device control: init\n");
93@@ -366,39 +366,29 @@ static Bool device_control(DeviceIntPtr dev, int mode)
94 }
95 }
96
97-static InputInfoPtr preinit(InputDriverPtr drv, IDevPtr dev, int flags)
98+static InputInfoPtr preinit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
99 {
100 struct mtev_mtouch *mt;
101- InputInfoPtr local = xf86AllocateInput(drv, 0);
102- if (!local)
103- goto error;
104+ int rc;
105+
106 mt = calloc(1, sizeof(struct mtev_mtouch));
107+
108 if (!mt)
109 goto error;
110
111- local->name = dev->identifier;
112- local->type_name = XI_TOUCHSCREEN;
113- local->device_control = device_control;
114- local->read_input = read_input;
115- local->private = mt;
116- local->flags = XI86_POINTER_CAPABLE |
117- XI86_SEND_DRAG_EVENTS;
118-
119- local->conf_idev = dev;
120-
121- xf86CollectInputOptions(local, NULL, NULL);
122- //xf86OptionListReport(local->options);
123- xf86ProcessCommonOptions(local, local->options);
124+ pInfo->private = mt;
125+ pInfo->type_name = "UNKNOWN";
126+ pInfo->device_control = device_control;
127+ pInfo->read_input = read_input;
128
129+ mt->swap_xy = xf86SetBoolOption(pInfo->options, "SwapAxes", FALSE);
130+ mt->invert_x = xf86SetBoolOption(pInfo->options, "InvertX", FALSE);
131+ mt->invert_y = xf86SetBoolOption(pInfo->options, "InvertY", FALSE);
132
133- mt->swap_xy = xf86SetBoolOption(local->options, "SwapAxes", FALSE);
134- mt->invert_x = xf86SetBoolOption(local->options, "InvertX", FALSE);
135- mt->invert_y = xf86SetBoolOption(local->options, "InvertY", FALSE);
136-
137- local->flags |= XI86_CONFIGURED;
138+ return Success;
139
140 error:
141- return local;
142+ return !Success;
143 }
144
145 static void uninit(InputDriverPtr drv, InputInfoPtr local, int flags)
146@@ -415,7 +405,6 @@ static InputDriverRec MTEV = {
147 .PreInit = preinit,
148 .UnInit = uninit,
149 .module = NULL,
150- .refCount = 0
151 };
152
153 static XF86ModuleVersionInfo VERSION = {
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-input-mtev_git.bb b/meta-oe/recipes-graphics/xorg-driver/xf86-input-mtev_git.bb
new file mode 100644
index 000000000..a604d4651
--- /dev/null
+++ b/meta-oe/recipes-graphics/xorg-driver/xf86-input-mtev_git.bb
@@ -0,0 +1,21 @@
1require recipes-graphics/xorg-driver/xorg-driver-input.inc
2DESCRIPTION = "X.Org X server -- multitouch input driver"
3PR = "r0"
4LICENSE = "GPLv2+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=8a71d0475d08eee76d8b6d0c6dbec543"
6
7DEPENDS += "pixman"
8
9SRC_URI = "git://gitorious.org/xorg/xf86-input-mtev.git file://fix-it.patch"
10SRCREV = "1eb469166ffc095c5801475f057f911f97a6e641"
11S = "${WORKDIR}/git"
12PV = "1.0.0+gitr${SRCPV}"
13PR = "${INC_PR}.0"
14
15EXTRA_OEMAKE = "'INCLUDE=-I${STAGING_INCDIR}/xorg -I${STAGING_INCDIR}/pixman-1'"
16
17#skip xorg-driver-common.inc AC_CHECK_FILE mangling
18do_configure_prepend () {
19 sed 's#gcc#${CC}#g' -i Makefile
20 return
21}