Add PCMCIA server for HP VGA Out PC Card and the Voyager VGA Card. Use on

the Compaq IPAQ. Use -listmodes to see supported modes. Hack the
    touchscreen driver to work as a mouse pad for the VGA screen. Fixup key
    bindings so xmodmap can remap IPAQ's buttons as mouse buttons.
This commit is contained in:
Alan Hourihane
2001-05-23 08:56:09 +00:00
parent f9104754cd
commit 85d827f532
14 changed files with 2044 additions and 16 deletions

View File

@@ -1,5 +1,5 @@
/*
* $XFree86$
* $XFree86: xc/programs/Xserver/hw/kdrive/linux/ts.c,v 1.2 2000/09/26 15:57:04 tsi Exp $
*
* Derived from ps2.c by Jim Gettys
*
@@ -35,6 +35,10 @@
#include <sys/ioctl.h>
#include <linux/h3600_ts.h> /* touch screen events */
static long lastx = 0, lasty = 0;
int TsScreen;
extern int TsFbdev;
void
TsRead (int tsPort)
{
@@ -52,20 +56,39 @@ TsRead (int tsPort)
{
if (event.pressure)
{
flags = KD_BUTTON_1;
x = event.x;
y = event.y;
}
else {
/*
* 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);
}
}
char *TsNames[] = {
"/dev/ts",
"/dev/h3600_ts" /* temporary name; note this code can try