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