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 +#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 #include #include +#include #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 -#include /* 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; } ;