Line 0
Link Here
|
|
|
1 |
From ef1e9cf34e8f1ec2513dd6bd36d824b54e841ea7 Mon Sep 17 00:00:00 2001 |
2 |
From: Cyril Brulebois <kibi@debian.org> |
3 |
Date: Fri, 3 Jun 2011 15:59:15 +0200 |
4 |
Subject: Drop support for pre-input ABI 12 servers. |
5 |
|
6 |
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> |
7 |
Reviewed-by: Daniel Stone <daniel@fooishbar.org> |
8 |
Signed-off-by: Cyril Brulebois <kibi@debian.org> |
9 |
|
10 |
diff --git a/configure.ac b/configure.ac |
11 |
index 4c76754..d4a404d 100644 |
12 |
--- configure.ac |
13 |
+++ configure.ac |
14 |
@@ -55,7 +55,7 @@ AC_CHECK_HEADERS([linux/input.h sysfs/libsysfs.h]) |
15 |
XORG_DRIVER_CHECK_EXT(RANDR, randrproto) |
16 |
|
17 |
# Obtain compiler/linker options from server and required extensions |
18 |
-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901] xproto kbproto inputproto $REQUIRED_MODULES) |
19 |
+PKG_CHECK_MODULES(XORG, [xorg-server >= 1.10] xproto kbproto inputproto $REQUIRED_MODULES) |
20 |
|
21 |
# Define a configure option for an alternate input module directory |
22 |
AC_ARG_WITH(xorg-module-dir, |
23 |
diff --git a/src/acecad.c b/src/acecad.c |
24 |
index d60b3b6..17e141f 100644 |
25 |
--- src/acecad.c |
26 |
+++ src/acecad.c |
27 |
@@ -90,6 +90,10 @@ |
28 |
#endif |
29 |
#define DBG(lvl, f) {if ((lvl) <= xf86GetVerbosity()) f;} |
30 |
|
31 |
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 |
32 |
+#error "XINPUT ABI 12 required." |
33 |
+#endif |
34 |
+ |
35 |
/***************************************************************************** |
36 |
* Local Headers |
37 |
****************************************************************************/ |
38 |
@@ -331,66 +335,8 @@ ProbeFound: |
39 |
|
40 |
#endif |
41 |
|
42 |
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 |
43 |
-static int NewAceCadPreInit(InputDriverPtr drv, InputInfoPtr dev, int flags); |
44 |
- |
45 |
-static InputInfoPtr |
46 |
-AceCadPreInit(InputDriverPtr drv, IDevPtr dev, int flags) |
47 |
-{ |
48 |
- InputInfoPtr local = xf86AllocateInput(drv, 0); |
49 |
- AceCadPrivatePtr priv = calloc (1, sizeof(AceCadPrivateRec)); |
50 |
- |
51 |
- if ((!local)) |
52 |
- goto SetupProc_fail; |
53 |
- |
54 |
- local->name = dev->identifier; |
55 |
- local->type_name = XI_TABLET; |
56 |
- local->flags = XI86_SEND_DRAG_EVENTS; |
57 |
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0 |
58 |
- local->motion_history_proc = xf86GetMotionEvents; |
59 |
-#endif |
60 |
- local->control_proc = NULL; |
61 |
- local->switch_mode = NULL; |
62 |
- local->conversion_proc = ConvertProc; |
63 |
- local->reverse_conversion_proc = ReverseConvertProc; |
64 |
- local->dev = NULL; |
65 |
- local->private = priv; |
66 |
- local->private_flags = 0; |
67 |
- local->conf_idev = dev; |
68 |
- /*local->always_core_feedback = 0;*/ |
69 |
- |
70 |
- xf86CollectInputOptions(local, default_options, NULL); |
71 |
- |
72 |
- xf86OptionListReport(local->options); |
73 |
- |
74 |
- if (NewAceCadPreInit(drv, local, flags) == Success) |
75 |
- return local; |
76 |
- |
77 |
-SetupProc_fail: |
78 |
- return NULL; |
79 |
-} |
80 |
- |
81 |
-static Bool |
82 |
-ReverseConvertProc (InputInfoPtr local, |
83 |
- int x, int y, |
84 |
- int *valuators) |
85 |
-{ |
86 |
- AceCadPrivatePtr priv = (AceCadPrivatePtr)(local->private); |
87 |
- |
88 |
- // xf86Msg(X_INFO, "%s: reverse coordinate conversion in : %d, %d\n", local->name, x, y); |
89 |
- valuators[0] = x * priv->acecadMaxX / screenInfo.screens[0]->width; |
90 |
- valuators[1] = y * priv->acecadMaxY / screenInfo.screens[0]->height; |
91 |
- // xf86Msg(X_INFO, "%s: reverse coordinate conversion out: %d, %d\n", local->name, valuators[0], valuators[1]); |
92 |
- |
93 |
- return TRUE; |
94 |
-} |
95 |
- |
96 |
-static int |
97 |
-NewAceCadPreInit(InputDriverPtr drv, InputInfoPtr local, int flags) |
98 |
-#else |
99 |
static int |
100 |
AceCadPreInit(InputDriverPtr drv, InputInfoPtr local, int flags) |
101 |
-#endif |
102 |
{ |
103 |
AceCadPrivatePtr priv = calloc (1, sizeof(AceCadPrivateRec)); |
104 |
int speed; |
105 |
@@ -500,10 +446,6 @@ AceCadPreInit(InputDriverPtr drv, InputInfoPtr local, int flags) |
106 |
|
107 |
xf86ProcessCommonOptions(local, local->options); |
108 |
|
109 |
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 |
110 |
- local->flags |= XI86_CONFIGURED; |
111 |
-#endif |
112 |
- |
113 |
if (local->fd != -1) |
114 |
{ |
115 |
RemoveEnabledDevice (local->fd); |
116 |
@@ -709,9 +651,6 @@ DeviceInit (DeviceIntPtr dev) |
117 |
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 |
118 |
axes_labels, |
119 |
#endif |
120 |
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3 |
121 |
- xf86GetMotionEvents, |
122 |
-#endif |
123 |
history_size, |
124 |
((priv->flags & ABSOLUTE_FLAG)? Absolute: Relative)|OutOfProximity) |
125 |
== FALSE) |
126 |
@@ -818,9 +757,6 @@ ReadInput (InputInfoPtr local) |
127 |
/*xf86Msg(X_INFO, "ACECAD Tablet Read Input\n");*/ |
128 |
|
129 |
is_absolute = (priv->flags & ABSOLUTE_FLAG); |
130 |
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0 |
131 |
- is_core_pointer = xf86IsCorePointer(local->dev); |
132 |
-#endif |
133 |
|
134 |
/* |
135 |
* set blocking to -1 on the first call because we know there is data to |
136 |
@@ -923,9 +859,6 @@ USBReadInput (InputInfoPtr local) |
137 |
int prox = priv->acecadOldProximity; |
138 |
int buttons = priv->acecadOldButtons; |
139 |
int is_core_pointer = 0; |
140 |
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0 |
141 |
- is_core_pointer = xf86IsCorePointer(local->dev); |
142 |
-#endif |
143 |
/* Is autodev active? */ |
144 |
int autodev = priv->flags & AUTODEV_FLAG; |
145 |
/* Was the device available last time we checked? */ |
146 |
diff --git a/src/acecad.h b/src/acecad.h |
147 |
index bd8e997..b9291c7 100644 |
148 |
--- src/acecad.h |
149 |
+++ src/acecad.h |
150 |
@@ -105,12 +105,7 @@ static Bool ConvertProc (InputInfoPtr, int, int, int, int, int, int, int, int, i |
151 |
static Bool QueryHardware (AceCadPrivatePtr); |
152 |
static void NewPacket (AceCadPrivatePtr priv); |
153 |
static Bool AceCadGetPacket (AceCadPrivatePtr); |
154 |
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 |
155 |
-static InputInfoPtr AceCadPreInit(InputDriverPtr, IDevPtr , int); |
156 |
-static Bool ReverseConvertProc(InputInfoPtr , int , int , int*); |
157 |
-#else |
158 |
static int AceCadPreInit(InputDriverPtr, InputInfoPtr , int); |
159 |
-#endif |
160 |
#ifdef HAVE_LINUX_INPUT_H |
161 |
static void USBReadInput (InputInfoPtr); |
162 |
static Bool USBQueryHardware (InputInfoPtr); |
163 |
-- |
164 |
cgit v0.10.2 |
165 |
|