wok-next view xorg-xf86-input-mutouch/stuff/mutouch-1.2.1-abi.patch @ rev 9645
Up: firefox-langpack-zh_CN to 4.0.1.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Thu Apr 28 23:48:22 2011 +0000 (2011-04-28) |
parents | |
children |
line source
1 From db04a5333b545a0442b995bae47d2c5527a7459e Mon Sep 17 00:00:00 2001
2 From: Peter Hutterer <peter.hutterer@who-t.net>
3 Date: Fri, 17 Jul 2009 14:18:51 +1000
4 Subject: [PATCH] Cope with XINPUT ABI 7.
6 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 ---
8 src/xf86MuTouch.c | 25 ++++++++++++++++++++++---
9 1 files changed, 22 insertions(+), 3 deletions(-)
11 diff --git a/src/xf86MuTouch.c b/src/xf86MuTouch.c
12 index 2d5cdb0..de319fc 100644
13 --- a/src/xf86MuTouch.c
14 +++ b/src/xf86MuTouch.c
15 @@ -749,6 +749,10 @@ xf86MuTControl(DeviceIntPtr dev,
16 unsigned char req[MuT_PACKET_SIZE];
17 unsigned char reply[MuT_BUFFER_SIZE];
18 char *id_string = DEVICE_ID(local->private_flags) == FINGER_ID ? "finger" : "stylus";
19 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
20 + Atom btn_label;
21 + Atom axis_labels[2] = { 0, 0 };
22 +#endif
24 switch(mode) {
26 @@ -766,7 +770,11 @@ xf86MuTControl(DeviceIntPtr dev,
27 /*
28 * Device reports button press for up to 1 button.
29 */
30 - if (InitButtonClassDeviceStruct(dev, 1, map) == FALSE) {
31 + if (InitButtonClassDeviceStruct(dev, 1,
32 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
33 + &btn_label,
34 +#endif
35 + map) == FALSE) {
36 ErrorF("Unable to allocate ButtonClassDeviceStruct\n");
37 return !Success;
38 }
39 @@ -779,6 +787,9 @@ xf86MuTControl(DeviceIntPtr dev,
40 * screen to fit one meter.
41 */
42 if (InitValuatorClassDeviceStruct(dev, 2,
43 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
44 + axis_labels,
45 +#endif
46 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
47 xf86GetMotionEvents,
48 #endif
49 @@ -787,11 +798,19 @@ xf86MuTControl(DeviceIntPtr dev,
50 return !Success;
51 }
52 else {
53 - InitValuatorAxisStruct(dev, 0, priv->min_x, priv->max_x,
54 + InitValuatorAxisStruct(dev, 0,
55 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
56 + axis_labels[0],
57 +#endif
58 + priv->min_x, priv->max_x,
59 9500,
60 0 /* min_res */,
61 9500 /* max_res */);
62 - InitValuatorAxisStruct(dev, 1, priv->min_y, priv->max_y,
63 + InitValuatorAxisStruct(dev, 1,
64 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
65 + axis_labels[1],
66 +#endif
67 + priv->min_y, priv->max_y,
68 10500,
69 0 /* min_res */,
70 10500 /* max_res */);
71 --
72 1.6.3.rc1.2.g0164.dirty