summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-02-05 17:30:18 -0200
committerPeter Hutterer <peter.hutterer@who-t.net>2009-02-15 09:19:18 +1000
commit2154cf5b31c7868e32e1cdc6865ed32c2bff5e88 (patch)
tree0d3bc0850c9582b75573e54c4a6cbdaaeb971216 /src
parent48295279acfcd2b6902daa49a5eb944318240586 (diff)
Janitor: update for ABI_XINPUT_VERSION >= 5
This driver should be seen as the simplest possible input driver, and somewhat as a skeleton/model for newer ones. Having it at least compiling with current xorg sdk is a plus. Signed-off-by: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r--src/void.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/void.c b/src/void.c
index a5a47be..ce005d0 100644
--- a/src/void.c
+++ b/src/void.c
@@ -57,6 +57,7 @@
/******************************************************************************
* Function/Macro keys variables
*****************************************************************************/
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 5
static KeySym void_map[] =
{
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
@@ -130,6 +131,7 @@ static KeySymsRec void_keysyms = {
/* map minKeyCode maxKeyCode width */
void_map, 8, 255, 1
};
+#endif /* GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 5 */
static const char *DEFAULTS[] = {
NULL
@@ -172,6 +174,10 @@ xf86VoidControlProc(DeviceIntPtr device, int what)
InputInfoPtr pInfo;
unsigned char map[MAXBUTTONS + 1];
int i;
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 5
+ XkbRMLVOSet rmlvo;
+#endif
+ Bool result;
pInfo = device->public.devicePrivate;
@@ -202,7 +208,16 @@ xf86VoidControlProc(DeviceIntPtr device, int what)
return !Success;
}
*/
- if (InitKeyboardDeviceStruct((DevicePtr)device, &void_keysyms, NULL, BellProc, KeyControlProc) == FALSE) {
+
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 5
+ memset(&rmlvo, 0, sizeof(XkbRMLVOSet));
+ result = InitKeyboardDeviceStruct(device, &rmlvo,
+ BellProc, KeyControlProc);
+#else
+ result = InitKeyboardDeviceStruct((DevicePtr)device, &void_keysyms,
+ NULL, BellProc, KeyControlProc);
+#endif
+ if (!result) {
ErrorF("unable to init keyboard device\n");
return !Success;
}