diff options
author | Matthias Hopf <mhopf@suse.de> | 2005-11-09 17:05:41 +0000 |
---|---|---|
committer | Matthias Hopf <mhopf@suse.de> | 2005-11-09 17:05:41 +0000 |
commit | f886e632b8dab1bfa0de42b9759a8284ecd9b94f (patch) | |
tree | 4a4f1d242c8e125e424c7d321d175cc0f491c037 | |
parent | a25871ae52dd5ce094ba8c1b2021dd027d3e71bd (diff) |
Bug #4915: ButtonMapping option which allows to define arbitrary button
mappings (including left-handed mouse etc.). Fixed incorrect usage of
non-reversed, but ZAxisMapped buttons for state detection. Nuked unused
part of reverseMap.
-rw-r--r-- | hw/xfree86/os-support/bsd/bsd_mouse.c | 1 | ||||
-rw-r--r-- | hw/xfree86/os-support/sco/sco_mouse.c | 1 | ||||
-rw-r--r-- | hw/xfree86/os-support/sysv/xqueue.c | 1 | ||||
-rw-r--r-- | hw/xfree86/os-support/xf86OSmouse.h | 28 |
4 files changed, 18 insertions, 13 deletions
diff --git a/hw/xfree86/os-support/bsd/bsd_mouse.c b/hw/xfree86/os-support/bsd/bsd_mouse.c index e4a1a4e6e..6ef300197 100644 --- a/hw/xfree86/os-support/bsd/bsd_mouse.c +++ b/hw/xfree86/os-support/bsd/bsd_mouse.c @@ -551,6 +551,7 @@ usbMouseProc(DeviceIntPtr pPointer, int what) } } pMse->lastButtons = 0; + pMse->lastMappedButtons = 0; pMse->emulateState = 0; pPointer->public.on = TRUE; break; diff --git a/hw/xfree86/os-support/sco/sco_mouse.c b/hw/xfree86/os-support/sco/sco_mouse.c index d60107f68..f29fcd7d9 100644 --- a/hw/xfree86/os-support/sco/sco_mouse.c +++ b/hw/xfree86/os-support/sco/sco_mouse.c @@ -152,6 +152,7 @@ OsMouseProc (DeviceIntPtr pPointer, int what) case DEVICE_ON: pMse->lastButtons = 0; + pMse->lastMappedButtons = 0; pMse->emulateState = 0; pPointer->public.on = TRUE; ev_resume(); diff --git a/hw/xfree86/os-support/sysv/xqueue.c b/hw/xfree86/os-support/sysv/xqueue.c index a14fc32e6..6c2132cef 100644 --- a/hw/xfree86/os-support/sysv/xqueue.c +++ b/hw/xfree86/os-support/sysv/xqueue.c @@ -480,6 +480,7 @@ XqMouseProc(DeviceIntPtr pPointer, int what) case DEVICE_ON: pMse->lastButtons = 0; + pMse->lastMappedButtons = 0; pMse->emulateState = 0; pPointer->public.on = TRUE; ret = XqEnable(pInfo); diff --git a/hw/xfree86/os-support/xf86OSmouse.h b/hw/xfree86/os-support/xf86OSmouse.h index 7cb732237..9db1bac19 100644 --- a/hw/xfree86/os-support/xf86OSmouse.h +++ b/hw/xfree86/os-support/xf86OSmouse.h @@ -190,6 +190,19 @@ extern OSMouseInfoPtr xf86OSMouseInit(int flags); (xf86GetBuiltinInterfaceVersion(BUILTIN_IF_OSMOUSE, 0) >= \ BUILTIN_INTERFACE_VERSION_NUMERIC(1, 1, 0)) +/* Z axis mapping */ +#define MSE_NOZMAP 0 +#define MSE_MAPTOX -1 +#define MSE_MAPTOY -2 +#define MSE_MAPTOZ -3 +#define MSE_MAPTOW -4 + +/* Generalize for other axes. */ +#define MSE_NOAXISMAP MSE_NOZMAP + +#define MSE_MAXBUTTONS 24 +#define MSE_DFLTBUTTONS 3 + /* * Mouse device record. This is shared by the mouse driver and the OSMouse * layer. @@ -275,19 +288,8 @@ typedef struct _MouseDevRec { int doubleClickTargetButton; int doubleClickTargetButtonMask; int doubleClickOldSourceState; + int lastMappedButtons; + int buttonMap[MSE_MAXBUTTONS]; } MouseDevRec, *MouseDevPtr; -/* Z axis mapping */ -#define MSE_NOZMAP 0 -#define MSE_MAPTOX -1 -#define MSE_MAPTOY -2 -#define MSE_MAPTOZ -3 -#define MSE_MAPTOW -4 - -/* Generalize for other axes. */ -#define MSE_NOAXISMAP MSE_NOZMAP - -#define MSE_MAXBUTTONS 24 -#define MSE_DFLTBUTTONS 3 - #endif /* _XF86OSMOUSE_H_ */ |