diff options
author | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2001-05-23 08:56:09 +0000 |
---|---|---|
committer | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2001-05-23 08:56:09 +0000 |
commit | 85d827f5329fa93dea1125788457fac6835cd134 (patch) | |
tree | d383a6b9972216d3164e319876693874155ef547 /hw/kdrive/src | |
parent | f9104754cda1212cf48d6d24a0a586c5368d7549 (diff) |
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.
Diffstat (limited to 'hw/kdrive/src')
-rw-r--r-- | hw/kdrive/src/kinput.c | 31 | ||||
-rw-r--r-- | hw/kdrive/src/kmap.c | 6 |
2 files changed, 32 insertions, 5 deletions
diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c index 00a757674..2636b8c11 100644 --- a/hw/kdrive/src/kinput.c +++ b/hw/kdrive/src/kinput.c @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/kinput.c,v 1.12 2001/01/23 06:25:05 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/kinput.c,v 1.13 2001/03/30 02:15:20 keithp Exp $ */ #include "kdrive.h" #include "inputstr.h" @@ -992,7 +992,7 @@ extern int nClients; void KdCheckSpecialKeys(xEvent *xE) { - KeySym sym; + KeySym sym = KEYCOL1(xE->u.u.detail); if (!pKdKeyboard) return; @@ -1001,7 +1001,25 @@ KdCheckSpecialKeys(xEvent *xE) */ if (xE->u.u.type == KeyRelease) return; - + +#ifdef XIPAQ + /* + * Check for buttons 1, 2 and 3 on the iPAQ + */ + if (sym == XK_Pointer_Button1) { + KdEnqueueMouseEvent(KD_MOUSE_DELTA | KD_BUTTON_1, 0, 0); + return; + } + if (sym == XK_Pointer_Button2) { + KdEnqueueMouseEvent(KD_MOUSE_DELTA | KD_BUTTON_2, 0, 0); + return; + } + if (sym == XK_Pointer_Button3) { + KdEnqueueMouseEvent(KD_MOUSE_DELTA | KD_BUTTON_3, 0, 0); + return; + } +#endif + /* * Check for control/alt pressed */ @@ -1009,7 +1027,6 @@ KdCheckSpecialKeys(xEvent *xE) (ControlMask|Mod1Mask)) return; - sym = KEYCOL1(xE->u.u.detail); /* * Let OS function see keysym first @@ -1428,16 +1445,22 @@ KdCursorOffScreen(ScreenPtr *ppScreen, int *x, int *y) static void KdCrossScreen(ScreenPtr pScreen, Bool entering) { +#ifndef XIPAQ if (entering) KdEnableScreen (pScreen); else KdDisableScreen (pScreen); +#endif } +/* HACK! */ +extern int TsScreen; + static void KdWarpCursor (ScreenPtr pScreen, int x, int y) { KdBlockSigio (); + TsScreen = pScreen->myNum; miPointerWarpCursor (pScreen, x, y); KdUnblockSigio (); } diff --git a/hw/kdrive/src/kmap.c b/hw/kdrive/src/kmap.c index 7238eaa2a..bf3991370 100644 --- a/hw/kdrive/src/kmap.c +++ b/hw/kdrive/src/kmap.c @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/kmap.c,v 1.6 2000/12/13 18:06:54 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/kmap.c,v 1.7 2001/03/30 02:15:20 keithp Exp $ */ #include "kdrive.h" @@ -67,7 +67,11 @@ KdMapDevice (CARD32 addr, CARD32 size) void *a; int fd; +#ifdef __arm__ + fd = open ("/dev/mem", O_RDWR|O_SYNC); +#else fd = open ("/dev/mem", O_RDWR); +#endif if (fd < 0) FatalError ("KdMapDevice: failed to open /dev/mem (%s)\n", strerror (errno)); |