summaryrefslogtreecommitdiffstats
path: root/obsolete-buildroot/sources/tinyx-011010.patch
blob: 3040b3dd405be2e311a9426d2385409c83e2945b (plain)
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
diff -Nur --exclude=CVS xc-011010.src/include/extensions/lbxstr.h xc-011010/include/extensions/lbxstr.h
--- xc-011010.src/include/extensions/lbxstr.h	Tue Jul 31 20:44:35 2001
+++ xc-011010/include/extensions/lbxstr.h	Sun Apr 21 12:35:05 2002
@@ -25,7 +25,7 @@
 #ifndef _LBXSTR_H_
 #define _LBXSTR_H_
 
-#include <X11/extensions/XLbx.h>
+#include "XLbx.h"
 
 #define LBXNAME "LBX"
 
diff -Nur --exclude=CVS xc-011010.src/programs/Xserver/hw/kdrive/fbdev/fbdev.h xc-011010/programs/Xserver/hw/kdrive/fbdev/fbdev.h
--- xc-011010.src/programs/Xserver/hw/kdrive/fbdev/fbdev.h	Sun Jun  3 17:52:45 2001
+++ xc-011010/programs/Xserver/hw/kdrive/fbdev/fbdev.h	Sun Apr 21 12:36:25 2002
@@ -29,6 +29,7 @@
 #include <linux/fb.h>
 #include <unistd.h>
 #include <sys/mman.h>
+#include <sys/types.h>
 #include "kdrive.h"
 #include "layer.h"

diff -Nur xc-011010.src2/lib/X11/Xlib.h xc-011010/lib/X11/Xlib.h
--- xc-011010.src/programs/Xserver/hw/kdrive/linux/ts.c	Tue Jul 10 22:58:19 2001
+++ xc-011010/programs/Xserver/hw/kdrive/linux/ts.c	Tue Apr 23 20:16:23 2002
@@ -33,65 +33,48 @@
 #include "kdrive.h"
 #include "Xpoll.h"
 #include <sys/ioctl.h>
-#include <linux/h3600_ts.h>	/* touch screen events */
+
+typedef struct {
+  unsigned short          pressure;
+  unsigned short          x;
+  unsigned short          y;
+  unsigned short          pad;
+  struct timeval  stamp;
+} TS_EVENT;
 
 static long lastx = 0, lasty = 0;
 int TsScreen;
 extern int TsFbdev;
 
-void
-TsRead (int tsPort, void *closure)
-{
-    TS_EVENT	    event;
-    long	    buf[3];
-    int		    n;
-    long	    pressure;
-    long	    x, y;
-    unsigned long   flags;
-    unsigned long   buttons;
-
-    n = Ps2ReadBytes (tsPort, (char *) &event, 
-			 sizeof (event), sizeof (event));
-    if (n == sizeof (event))  
-    {
-	if (event.pressure) 
-	{
-	    /* 
-	     * HACK ATTACK.  (static global variables used !)
-	     * Here we test for the touch screen driver actually being on the
-	     * touch screen, if it is we send absolute coordinates. If not,
-	     * then we send delta's so that we can track the entire vga screen.
-	     */
-	    if (TsScreen == TsFbdev) {
-	    	flags = KD_BUTTON_1;
-	    	x = event.x;
-	    	y = event.y;
-	    } else {
-	    	flags = /* KD_BUTTON_1 |*/ KD_MOUSE_DELTA;
-	    	if ((lastx == 0) || (lasty == 0)) {
-	    	    x = 0;
-	    	    y = 0;
-	    	} else {
-	    	    x = event.x - lastx;
-	    	    y = event.y - lasty;
-	    	}
-	    	lastx = event.x;
-	    	lasty = event.y;
-	    }
-	} else {
-	    flags = KD_MOUSE_DELTA;
-	    x = 0;
-	    y = 0;
-	    lastx = 0;
-	    lasty = 0;
-	}
-	KdEnqueueMouseEvent (flags, x, y);
+void TsRead (int tsPort, void *closure) {
+  TS_EVENT        event;
+  long            buf[3];
+  int             n;
+  long            pressure;
+  long            x, y;
+  unsigned long   flags;
+  unsigned long   buttons;
+
+  n = Ps2ReadBytes(tsPort, (char *) &event, sizeof (event), sizeof (event));
+  if (n >= sizeof (event)) {
+    if (event.pressure >= 100) {
+      flags = KD_BUTTON_1;
+      x = (960 - event.x) * 640 / (920);
+      y = (960 - event.y) * 480 / (920);
+      //ErrorF("flags %d x %d y %dn",flags,event.x,event.y);
+    }
+    else {
+      flags = KD_MOUSE_DELTA;
+      x = lastx;
+      y = lasty;
     }
+    KdEnqueueMouseEvent(flags, x, y);
+  }
 }
 
 char	*TsNames[] = {
-  "/dev/ts",	
-  "/dev/h3600_ts" /* temporary name; note this code can try
+  "/dev/ucb1x00-ts",
+  "/dev/ts" /* temporary name; note this code can try
 			   to open more than one device */
 };
 
@@ -99,9 +82,7 @@
 
 int TsInputType;
 
-int
-TsInit (void)
-{
+int TsInit (void) {
     int	    i;
     int	    TsPort;
 
diff -Nur xc-011010.src/startx xc-011010/startx
--- ../../buildroot-tux.Apr25-1/build/xc-011010.src/startx	Thu Apr 25 05:20:35 2002
+++ xc-011010/startx	Sun Apr 28 05:35:35 2002
@@ -0,0 +1,11 @@
+#!/bin/sh
+killall Xfbdev
+sleep 1
+export DISPLAY=":0"
+/usr/X11R6/bin/Xfbdev -ac &
+sleep 4
+/usr/X11R6/bin/matchbox &
+sleep 1
+/usr/X11R6/bin/minisys &
+/usr/X11R6/bin/minitime &
+/usr/X11R6/bin/rxvt &
diff -Nur xc-011010.src/lib/Xft/xftgram.y xc-011010/lib/Xft/xftgram.y
--- ../../buildroot-tux.Apr25-1/build/xc-011010/lib/Xft/xftgram.y	Thu Apr 25 05:20:35 2002
+++ xc-011010/lib/Xft/xftgram.y	Sun Apr 28 05:35:35 2002
@@ -165,6 +165,7 @@
 		    matrix.yx = $4;
 		    matrix.__REALLY_YY__ = $5;
 		}
+	;
 number	:   INTEGER
 		{ $$ = (double) $1; }
 	|   DOUBLE
diff -Nur xc-011010.src/programs/twm/gram.y xc-011010/programs/twm/gram.y
--- ../../buildroot-tux.Apr25-1/build/xc-011010/programs/twm/gram.y	Thu Apr 25 05:20:35 2002
+++ xc-011010/programs/twm/gram.y	Sun Apr 28 05:35:35 2002
@@ -650,6 +650,7 @@
 					  RemoveDQuote(ptr);
 					  $$ = ptr;
 					}
+		;
 number		: NUMBER		{ $$ = $1; }
 		;