Update bridge utils to latest version
[gumsense-br.git] / package / tinyx / tinyx-011010.patch
blob7ff6da5efc7867cf339a4d3a796dd4276de20b03
1 --- xc-011010/config/cf/X11.tmpl.orig 2005-05-12 16:16:17.000000000 -0600
2 +++ xc-011010/config/cf/X11.tmpl 2005-05-12 16:16:23.000000000 -0600
3 @@ -3055,7 +3055,7 @@
4 $(RM) index.raw file.nPS file.PS file.txt
5 #endif
7 -#ifndef MakeSimpleDoc(file,srcs)
8 +#ifndef MakeSimpleDoc
9 #define MakeSimpleDoc(file,srcs) MakeDepSimpleDoc(file,srcs,srcs)
10 #endif
12 --- xc-011010/config/cf/kdrive.cf.orig 2005-05-12 16:14:50.000000000 -0600
13 +++ xc-011010/config/cf/kdrive.cf 2005-05-12 16:15:03.000000000 -0600
14 @@ -201,7 +201,7 @@
15 #undef ServerOSDefines
16 #define ServerOSDefines -DDDXOSINIT
18 -#ifndef Other IConfigFiles
19 +#ifndef OtherIConfigFiles
20 #define OtherIConfigFile $(IRULESRC)/kdrive.cf
21 #endif
23 diff -Nur --exclude=CVS xc-011010.src/include/extensions/lbxstr.h xc-011010/include/extensions/lbxstr.h
24 --- xc-011010.src/include/extensions/lbxstr.h Tue Jul 31 20:44:35 2001
25 +++ xc-011010/include/extensions/lbxstr.h Sun Apr 21 12:35:05 2002
26 @@ -25,7 +25,7 @@
27 #ifndef _LBXSTR_H_
28 #define _LBXSTR_H_
30 -#include <X11/extensions/XLbx.h>
31 +#include "XLbx.h"
33 #define LBXNAME "LBX"
35 diff -Nur --exclude=CVS xc-011010.src/programs/Xserver/hw/kdrive/fbdev/fbdev.h xc-011010/programs/Xserver/hw/kdrive/fbdev/fbdev.h
36 --- xc-011010.src/programs/Xserver/hw/kdrive/fbdev/fbdev.h Sun Jun 3 17:52:45 2001
37 +++ xc-011010/programs/Xserver/hw/kdrive/fbdev/fbdev.h Sun Apr 21 12:36:25 2002
38 @@ -29,6 +29,7 @@
39 #include <linux/fb.h>
40 #include <unistd.h>
41 #include <sys/mman.h>
42 +#include <sys/types.h>
43 #include "kdrive.h"
44 #include "layer.h"
46 diff -Nur xc-011010.src2/lib/X11/Xlib.h xc-011010/lib/X11/Xlib.h
47 --- xc-011010.src/programs/Xserver/hw/kdrive/linux/ts.c Tue Jul 10 22:58:19 2001
48 +++ xc-011010/programs/Xserver/hw/kdrive/linux/ts.c Tue Apr 23 20:16:23 2002
49 @@ -33,65 +33,48 @@
50 #include "kdrive.h"
51 #include "Xpoll.h"
52 #include <sys/ioctl.h>
53 -#include <linux/h3600_ts.h> /* touch screen events */
55 +typedef struct {
56 + unsigned short pressure;
57 + unsigned short x;
58 + unsigned short y;
59 + unsigned short pad;
60 + struct timeval stamp;
61 +} TS_EVENT;
63 static long lastx = 0, lasty = 0;
64 int TsScreen;
65 extern int TsFbdev;
67 -void
68 -TsRead (int tsPort, void *closure)
70 - TS_EVENT event;
71 - long buf[3];
72 - int n;
73 - long pressure;
74 - long x, y;
75 - unsigned long flags;
76 - unsigned long buttons;
78 - n = Ps2ReadBytes (tsPort, (char *) &event,
79 - sizeof (event), sizeof (event));
80 - if (n == sizeof (event))
81 - {
82 - if (event.pressure)
83 - {
84 - /*
85 - * HACK ATTACK. (static global variables used !)
86 - * Here we test for the touch screen driver actually being on the
87 - * touch screen, if it is we send absolute coordinates. If not,
88 - * then we send delta's so that we can track the entire vga screen.
89 - */
90 - if (TsScreen == TsFbdev) {
91 - flags = KD_BUTTON_1;
92 - x = event.x;
93 - y = event.y;
94 - } else {
95 - flags = /* KD_BUTTON_1 |*/ KD_MOUSE_DELTA;
96 - if ((lastx == 0) || (lasty == 0)) {
97 - x = 0;
98 - y = 0;
99 - } else {
100 - x = event.x - lastx;
101 - y = event.y - lasty;
103 - lastx = event.x;
104 - lasty = event.y;
106 - } else {
107 - flags = KD_MOUSE_DELTA;
108 - x = 0;
109 - y = 0;
110 - lastx = 0;
111 - lasty = 0;
113 - KdEnqueueMouseEvent (flags, x, y);
114 +void TsRead (int tsPort, void *closure) {
115 + TS_EVENT event;
116 + long buf[3];
117 + int n;
118 + long pressure;
119 + long x, y;
120 + unsigned long flags;
121 + unsigned long buttons;
123 + n = Ps2ReadBytes(tsPort, (char *) &event, sizeof (event), sizeof (event));
124 + if (n >= sizeof (event)) {
125 + if (event.pressure >= 100) {
126 + flags = KD_BUTTON_1;
127 + x = (960 - event.x) * 640 / (920);
128 + y = (960 - event.y) * 480 / (920);
129 + //ErrorF("flags %d x %d y %dn",flags,event.x,event.y);
131 + else {
132 + flags = KD_MOUSE_DELTA;
133 + x = lastx;
134 + y = lasty;
136 + KdEnqueueMouseEvent(flags, x, y);
140 char *TsNames[] = {
141 - "/dev/ts",
142 - "/dev/h3600_ts" /* temporary name; note this code can try
143 + "/dev/ucb1x00-ts",
144 + "/dev/ts" /* temporary name; note this code can try
145 to open more than one device */
148 @@ -99,9 +82,7 @@
150 int TsInputType;
152 -int
153 -TsInit (void)
155 +int TsInit (void) {
156 int i;
157 int TsPort;
159 diff -Nur xc-011010.src/startx xc-011010/startx
160 --- ../../buildroot-tux.Apr25-1/build/xc-011010.src/startx Thu Apr 25 05:20:35 2002
161 +++ xc-011010/startx Sun Apr 28 05:35:35 2002
162 @@ -0,0 +1,11 @@
163 +#!/bin/sh
164 +killall Xfbdev
165 +sleep 1
166 +export DISPLAY=":0"
167 +/usr/X11R6/bin/Xfbdev -ac &
168 +sleep 4
169 +/usr/X11R6/bin/matchbox &
170 +sleep 1
171 +/usr/X11R6/bin/minisys &
172 +/usr/X11R6/bin/minitime &
173 +/usr/X11R6/bin/rxvt &
174 diff -Nur xc-011010.src/lib/Xft/xftgram.y xc-011010/lib/Xft/xftgram.y
175 --- ../../buildroot-tux.Apr25-1/build/xc-011010/lib/Xft/xftgram.y Thu Apr 25 05:20:35 2002
176 +++ xc-011010/lib/Xft/xftgram.y Sun Apr 28 05:35:35 2002
177 @@ -165,6 +165,7 @@
178 matrix.yx = $4;
179 matrix.__REALLY_YY__ = $5;
182 number : INTEGER
183 { $$ = (double) $1; }
184 | DOUBLE
185 diff -Nur xc-011010.src/programs/twm/gram.y xc-011010/programs/twm/gram.y
186 --- ../../buildroot-tux.Apr25-1/build/xc-011010/programs/twm/gram.y Thu Apr 25 05:20:35 2002
187 +++ xc-011010/programs/twm/gram.y Sun Apr 28 05:35:35 2002
188 @@ -650,6 +650,7 @@
189 RemoveDQuote(ptr);
190 $$ = ptr;
193 number : NUMBER { $$ = $1; }