1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
|
Upstream-Status: Pending
Signed-off-by: Yu Ke <ke.yu@intel.com>
---
Xext/Makefile.am | 6 ++++++
configure.ac | 11 +++++++++--
include/kdrive-config.h.in | 3 +++
mi/miinitext.c | 6 ++++++
4 files changed, 24 insertions(+), 2 deletions(-)
Index: xorg-server-1.7.99.2/mi/miinitext.c
===================================================================
--- xorg-server-1.7.99.2.orig/mi/miinitext.c 2010-02-10 18:54:11.959086237 +0000
+++ xorg-server-1.7.99.2/mi/miinitext.c 2010-02-10 18:54:12.429078513 +0000
@@ -264,6 +264,9 @@
#ifdef DMXEXT
extern void DMXExtensionInit(INITARGS);
#endif
+#ifdef XCALIBRATE
+extern void XCalibrateExtensionInit(INITARGS);
+#endif
#ifdef XFIXES
extern void XFixesExtensionInit(INITARGS);
#endif
@@ -493,6 +496,9 @@
GlxPushProvider(&__glXDRISWRastProvider);
if (!noGlxExtension) GlxExtensionInit();
#endif
+#ifdef XCALIBRATE
+ XCalibrateExtensionInit ();
+#endif
}
#else /* XFree86LOADER */
Index: xorg-server-1.7.99.2/configure.ac
===================================================================
--- xorg-server-1.7.99.2.orig/configure.ac 2010-02-10 18:54:11.959086237 +0000
+++ xorg-server-1.7.99.2/configure.ac 2010-02-11 11:49:50.710736962 +0000
@@ -1985,7 +1985,7 @@
fi
- PKG_CHECK_MODULES([TSLIB], [tslib-0.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"])
+ PKG_CHECK_MODULES([TSLIB], [tslib-1.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"])
if test "x$HAVE_TSLIB" = xno; then
AC_CHECK_LIB(ts, ts_open, [HAVE_TSLIB="yes"])
fi
@@ -2039,7 +2039,7 @@
KDRIVE_LOCAL_LIBS="$MAIN_LIB $DIX_LIB $KDRIVE_LIB $KDRIVE_STUB_LIB $CONFIG_LIB"
KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $FB_LIB $MI_LIB $KDRIVE_PURE_LIBS"
KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $KDRIVE_OS_LIB $OS_LIB"
- KDRIVE_LIBS="$TSLIB_LIBS $KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS $GLX_SYS_LIBS $DLOPEN_LIBS"
+ KDRIVE_LIBS="$KDRIVE_LOCAL_LIBS $TSLIB_LIBS $XSERVER_SYS_LIBS $GLX_SYS_LIBS $DLOPEN_LIBS"
AC_SUBST([XEPHYR_LIBS])
AC_SUBST([XEPHYR_INCS])
Index: xorg-server-1.7.99.2/include/kdrive-config.h.in
===================================================================
--- xorg-server-1.7.99.2.orig/include/kdrive-config.h.in 2010-02-10 18:54:11.959086237 +0000
+++ xorg-server-1.7.99.2/include/kdrive-config.h.in 2010-02-10 18:54:12.429078513 +0000
@@ -28,4 +28,7 @@
/* Have execinfo.h for backtrace(). */
#undef HAVE_EXECINFO_H
+/* Enable XCalibrate extension */
+#undef XCALIBRATE
+
#endif /* _KDRIVE_CONFIG_H_ */
Index: xorg-server-1.7.99.2/hw/kdrive/linux/tslib.c
===================================================================
--- xorg-server-1.7.99.2.orig/hw/kdrive/linux/tslib.c 2010-02-10 18:58:12.669078495 +0000
+++ xorg-server-1.7.99.2/hw/kdrive/linux/tslib.c 2010-02-10 19:04:56.927828767 +0000
@@ -50,12 +50,15 @@
int fd;
int lastx, lasty;
struct tsdev *tsDev;
- void (*raw_event_hook)(int x, int y, int pressure, void *closure);
- void *raw_event_closure;
int phys_screen;
};
+/* For XCalibrate extension */
+void (*tslib_raw_event_hook)(int x, int y, int pressure, void *closure);
+void *tslib_raw_event_closure;
+
+
static void
TsRead (int fd, void *closure)
{
@@ -65,10 +68,10 @@
long x = 0, y = 0;
unsigned long flags;
- if (private->raw_event_hook) {
+ if (tslib_raw_event_hook) {
while (ts_read_raw(private->tsDev, &event, 1) == 1)
- private->raw_event_hook (event.x, event.y, event.pressure,
- private->raw_event_closure);
+ tslib_raw_event_hook (event.x, event.y, event.pressure,
+ tslib_raw_event_closure);
return;
}
@@ -111,8 +114,8 @@
{
struct TslibPrivate *private = pi->driverPrivate;
- private->raw_event_hook = NULL;
- private->raw_event_closure = NULL;
+ tslib_raw_event_hook = NULL;
+ tslib_raw_event_closure = NULL;
if (!pi->path) {
pi->path = strdup("/dev/input/touchscreen0");
ErrorF("[tslib/TslibEnable] no device path given, trying %s\n", pi->path);
Index: xorg-server-1.7.99.2/Xext/xcalibrate.c
===================================================================
--- xorg-server-1.7.99.2.orig/Xext/xcalibrate.c 2010-02-10 18:59:24.097829840 +0000
+++ xorg-server-1.7.99.2/Xext/xcalibrate.c 2010-02-11 11:51:00.930735731 +0000
@@ -115,6 +115,7 @@
memset (&rep, 0, sizeof (rep));
rep.type = X_Reply;
+ rep.length = 0;
rep.sequenceNumber = client->sequence;
if (stuff->on)
@@ -158,6 +159,7 @@
swaps (&rep.sequenceNumber, n);
swaps (&rep.status, n);
+ swapl (&rep.length, n);
}
WriteToClient(client, sizeof (rep), (char *) &rep);
return (client->noClientException);
@@ -186,6 +188,7 @@
memset (&rep, 0, sizeof (rep));
rep.type = X_Reply;
+ rep.length = 0;
rep.sequenceNumber = client->sequence;
rep.x = stuff->x;
rep.y = stuff->y;
@@ -198,6 +201,7 @@
swaps (&rep.x, n);
swaps (&rep.y, n);
+ swapl (&rep.length, n);
}
WriteToClient(client, sizeof (rep), (char *) &rep);
return (client->noClientException);
|