wok-current view xorg-xf86-input-evtouch/stuff/evtouch.u @ rev 6956

Added girepository-1.0 folder into libwebkit instead of -dev package.
author Christopher Rogers <slaxemulator@gmail.com>
date Mon Oct 25 22:14:34 2010 +0000 (2010-10-25)
parents
children
line source
1 Remove unused variables and code just to make gcc happy
3 Index: xserver-xorg-input-evtouch/evtouch.c
4 ===================================================================
5 --- xserver-xorg-input-evtouch.orig/evtouch.c 2009-01-21 20:06:50.647249439 +0900
6 +++ xserver-xorg-input-evtouch/evtouch.c 2009-01-21 20:07:39.518253785 +0900
7 @@ -352,7 +352,6 @@ void EVTouchProcessAbs(EVTouchPrivatePtr
8 void EVTouchProcessRel(EVTouchPrivatePtr priv)
9 {
10 struct input_event *ev; /* packet being/just read */
11 - int dummy;
13 ev = &priv->ev;
14 if ( ev->code == REL_X ) {
15 @@ -745,17 +744,6 @@ EVTouchNewPacket (EVTouchPrivatePtr priv
19 -static unsigned char
20 -EVTouchRead(EVTouchPrivatePtr priv)
21 -{
22 - unsigned char c;
23 - XisbBlockDuration (priv->buffer, EV_TIMEOUT);
24 - c = XisbRead(priv->buffer);
25 - return (c);
26 -}
27 -
28 -
29 -
30 static Bool
31 EVTouchGetPacket (EVTouchPrivatePtr priv)
32 {
33 From: Thomas Jaeger <ThJaeger@gmail.com>
34 Date: Sun, 22 Mar 2009 20:58:58 -0400
35 Subject: Make calibration work on xserver-1.6
37 Stolen from Ubuntu.
39 Index: xserver-xorg-input-evtouch/ev_calibrate.c
40 ===================================================================
41 --- xserver-xorg-input-evtouch.orig/ev_calibrate.c
42 +++ xserver-xorg-input-evtouch/ev_calibrate.c
43 @@ -218,7 +218,7 @@
44 int cap_style = CapButt; /* style of the line's edje and */
45 int join_style = JoinBevel; /* joined lines. */
47 - int event_mask = ExposureMask | ButtonReleaseMask | PointerMotionMask | KeyPressMask;
48 + int event_mask = ExposureMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask | KeyPressMask;
50 int depth;
51 int screen_num;
52 Index: xserver-xorg-input-evtouch/evtouch.c
53 ===================================================================
54 --- xserver-xorg-input-evtouch.orig/evtouch.c
55 +++ xserver-xorg-input-evtouch/evtouch.c
56 @@ -306,7 +306,7 @@
57 }
59 if (pos_changed == 1) {
60 -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 2
61 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 2
62 ConvertProc(priv->local, 0, 2,
63 priv->raw_x, priv->raw_y,
64 0, 0, 0, 0,
65 @@ -369,7 +369,7 @@
66 priv->raw_y = priv->min_y;
67 }
69 -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 2
70 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 2
71 ConvertProc(priv->local, 0, 2,
72 priv->raw_x, priv->raw_y,
73 0, 0, 0, 0,
74 Index: xserver-xorg-input-evtouch/evtouch.c
75 ===================================================================
76 --- xserver-xorg-input-evtouch.orig/evtouch.c
77 +++ xserver-xorg-input-evtouch/evtouch.c
78 @@ -30,10 +30,8 @@
80 #define _evdev_touch_C_
82 -#include <xf86Version.h>
83 -#if XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(3,9,0,0,0)
84 +#include <xorgVersion.h>
85 #define XFREE86_V4
86 -#endif
88 /*****************************************************************************
89 * Standard Headers
90 @@ -74,7 +72,6 @@
91 #include "xf86_OSproc.h"
92 #include "xf86Xinput.h"
93 #include "exevents.h"
94 -#include "xf86OSmouse.h"
95 #include "randrstr.h"
97 #ifndef NEED_XF86_TYPES
98 @@ -139,7 +136,7 @@
99 "Kenan Esau",
100 MODINFOSTRING1,
101 MODINFOSTRING2,
102 - XF86_VERSION_CURRENT,
103 + XORG_VERSION_CURRENT,
104 0, 8, 8,
105 ABI_CLASS_XINPUT,
106 ABI_XINPUT_VERSION,
107 @@ -590,6 +587,10 @@
108 EVTouchPrivatePtr priv = (EVTouchPrivatePtr) (local->private);
109 unsigned char map[EV_MAX_BUTTONS];
110 int i;
111 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
112 + Atom btn_label;
113 + Atom axis_labels[2] = { 0, 0 };
114 +#endif
116 for (i = 0; i < EV_MAX_BUTTONS; i++)
117 map[i] = i;
118 @@ -628,7 +629,11 @@
119 /*
120 * Device reports button press for 5 buttons.
121 */
122 - if (InitButtonClassDeviceStruct (dev, EV_MAX_BUTTONS, map) == FALSE)
123 + if (InitButtonClassDeviceStruct (dev, EV_MAX_BUTTONS,
124 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
125 + &btn_label,
126 +#endif
127 + map) == FALSE)
128 {
129 ErrorF("Unable to allocate EVTouch touchscreen ButtonClassDeviceStruct\n");
130 return BadAlloc;
131 @@ -652,26 +657,43 @@
132 * Device reports motions on 2 axes in absolute coordinates.
133 * Axes min and max values are reported in raw coordinates.
134 */
135 - if (InitValuatorClassDeviceStruct(dev, 2, xf86GetMotionEvents,
136 + if (InitValuatorClassDeviceStruct(dev, 2,
137 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
138 + axis_labels,
139 +#endif
140 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
141 + xf86GetMotionEvents,
142 +#endif
143 local->history_size, Absolute) == FALSE)
144 {
145 ErrorF ("Unable to allocate EVTouch touchscreen ValuatorClassDeviceStruct\n");
146 return !Success;
147 }
149 -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 2
150 - xf86InitValuatorAxisStruct(dev, 0, 0, priv->screen_width,
151 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 2
152 + xf86InitValuatorAxisStruct(dev, 0,
153 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
154 + axis_labels[0],
155 +#endif
156 + 0, priv->screen_width,
157 1024,
158 EV_AXIS_MIN_RES /* min_res */ ,
159 EV_AXIS_MAX_RES /* max_res */ );
160 xf86InitValuatorDefaults(dev, 0);
161 - xf86InitValuatorAxisStruct(dev, 1, 0, priv->screen_height,
162 + xf86InitValuatorAxisStruct(dev, 1,
163 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
164 + axis_labels[1],
165 +#endif
166 + 0, priv->screen_height,
167 1024,
168 EV_AXIS_MIN_RES /* min_res */ ,
169 EV_AXIS_MAX_RES /* max_res */ );
170 xf86InitValuatorDefaults(dev, 1);
171 #else
172 xf86InitValuatorAxisStruct(dev, 0, priv->min_x, priv->max_x,
173 + 1024,
174 + EV_AXIS_MIN_RES /* min_res */ ,
175 + EV_AXIS_MAX_RES /* max_res */ );
176 xf86InitValuatorDefaults(dev, 1);
177 #endif