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.
This commit is contained in:
Matthias Hopf 2005-11-09 17:05:41 +00:00
parent a25871ae52
commit f886e632b8
4 changed files with 18 additions and 13 deletions

View File

@ -551,6 +551,7 @@ usbMouseProc(DeviceIntPtr pPointer, int what)
}
}
pMse->lastButtons = 0;
pMse->lastMappedButtons = 0;
pMse->emulateState = 0;
pPointer->public.on = TRUE;
break;

View File

@ -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();

View File

@ -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);

View File

@ -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_ */