From 44eedc5c44416a97b3f5ca03d596ec3c9fb29380 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Sat, 9 Oct 2004 02:49:33 +0000 Subject: facelift step number two --- package/tinyx/tinyx-011010.patch | 173 +++++++++++++++++++++++++++++++++++++++ package/tinyx/tinyx.mk | 3 +- 2 files changed, 174 insertions(+), 2 deletions(-) create mode 100644 package/tinyx/tinyx-011010.patch (limited to 'package/tinyx') diff --git a/package/tinyx/tinyx-011010.patch b/package/tinyx/tinyx-011010.patch new file mode 100644 index 000000000..3040b3dd4 --- /dev/null +++ b/package/tinyx/tinyx-011010.patch @@ -0,0 +1,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 ++#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; } + ; + diff --git a/package/tinyx/tinyx.mk b/package/tinyx/tinyx.mk index 1455ae6d8..a891b8a41 100644 --- a/package/tinyx/tinyx.mk +++ b/package/tinyx/tinyx.mk @@ -43,7 +43,6 @@ TINYX_LIBS:=ICE X11 Xext Xpm TINYX_DIR:=$(BUILD_DIR)/xc-011010 TINYX_LDIR:=$(TINYX_DIR)/lib TINYX_PROGS:=$(TINYX_DIR)/programs -TINYX_PATCH:=$(SOURCE_DIR)/tinyx-011010.patch TINYX_SOURCE:=xc-011010.tar.bz2 TINYX_SITE:= http://intimate.handhelds.org/jacques/ TINYX_CF:=$(TINYX_DIR)/config/cf @@ -72,7 +71,7 @@ $(DL_DIR)/host.def: # $(TINYX_DIR)/.configure: $(DL_DIR)/$(TINYX_SOURCE) $(DL_DIR)/cross.def $(DL_DIR)/host.def $(TINYX_CAT) $(DL_DIR)/$(TINYX_SOURCE) | tar -C $(BUILD_DIR) -xvf - - cat $(TINYX_PATCH) | patch -d $(TINYX_DIR) -p1 + toolchain/patch-kernel.sh $(TINYX_DIR) package/tinyx/ tinyx*.patch cp $(DL_DIR)/host.def $(TINYX_CF)/host.def cp $(DL_DIR)/cross.def $(TINYX_CF)/cross.def $(SED) 's,arm-uclibc-,$(ARCH)-linux-uclibc-,g' $(TINYX_CF)/cross.def -- cgit v1.2.3