2
1

tinyx-011010.patch 5.3 KB

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