xserver/hw/kdrive/src kinput.c,1.39,1.40
Carlos Romero
xserver-commit at pdx.freedesktop.org
Wed Jul 7 12:21:09 PDT 2004
Committed by: kidcrash
Update of /cvs/xserver/xserver/hw/kdrive/src
In directory pdx:/tmp/cvs-serv31969/hw/kdrive/src
Modified Files:
kinput.c
Log Message:
Initial kdrive XKB/XINPUT support, use --enable-xkb --enable-xinput
Index: kinput.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/src/kinput.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- kinput.c 15 Feb 2004 15:04:57 -0000 1.39
+++ kinput.c 7 Jul 2004 19:21:07 -0000 1.40
@@ -38,6 +38,11 @@
#include <signal.h>
#include <stdio.h>
+#ifdef XKB
+#define XKB_IN_SERVER
+#include <X11/extensions/XKBsrv.h>
+#endif
+
static DeviceIntPtr pKdKeyboard, pKdPointer;
static KdMouseFuncs *kdMouseFuncs;
@@ -431,6 +436,9 @@
{
Bool ret;
DevicePtr pDev = (DevicePtr)pDevice;
+#ifdef XKB
+ XkbComponentNamesRec names;
+#endif
if (!pDev)
return BadImplementation;
@@ -442,10 +450,24 @@
{
return !Success;
}
+#ifndef XKB
ret = InitKeyboardDeviceStruct(pDev,
&kdKeySyms,
kdModMap,
KdBell, KdKbdCtrl);
+#else
+ memset(&names, 0, sizeof(XkbComponentNamesRec));
+
+ if (XkbInitialMap)
+ names.keymap = XkbInitialMap;
+
+ XkbSetRulesDflts ("base", "pc101", "us", NULL, NULL);
+ ret = XkbInitKeyboardDeviceStruct (pDev,
+ &names,
+ &kdKeySyms,
+ kdModMap,
+ KdBell, KdKbdCtrl);
+#endif
if (!ret)
return BadImplementation;
break;
@@ -597,7 +619,7 @@
static long zero1, zero2;
//SetExtInputCheck (&zero1, &zero2);
- ErrorF("Extended Input Devices not yet supported. Impelement it at line %d in %s",
+ ErrorF("Extended Input Devices not yet supported. Impelement it at line %d in %s\n",
__LINE__, __FILE__);
}
#endif
More information about the xserver-commit
mailing list