summaryrefslogtreecommitdiff
path: root/hw/xfree86/common/xf86Xinput.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2007-09-06 18:57:00 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2007-09-06 18:57:00 +0930
commitd627061b48ae06d27b37be209d67a3f4f2388dd3 (patch)
tree46e4203bd65383ca7584dcafa5e3df5aa62cb6dd /hw/xfree86/common/xf86Xinput.c
parent5ee409794ee604fcf84886f70429fc2d6b1ff4f1 (diff)
xfree86: wrap keyboard devices for XKB.
Call ProcessOtherEvents first, then for all keyboard devices let them be wrapped by XKB. This way all XI events will go through XKB. Note that the VCK is still not wrapped, so core events will bypass XKB.
Diffstat (limited to 'hw/xfree86/common/xf86Xinput.c')
-rw-r--r--hw/xfree86/common/xf86Xinput.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 4c9de1f50..243623166 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -179,20 +179,15 @@ xf86ActivateDevice(LocalDevicePtr local)
dev->coreEvents = local->flags & XI86_ALWAYS_CORE;
dev->spriteInfo->spriteOwner = !(local->flags & XI86_SHARED_POINTER);
+ RegisterOtherDevice(dev);
+
#ifdef XKB
- if (!DeviceIsPointerType(dev))
+ if (!DeviceIsPointerType(dev) && !noXkbExtension)
{
- /* FIXME: that's not the nice way to do it. XKB wraps the previously
- * set procs, so if we don't have them here, our event will disappear
- * in a black hole.*/
- dev->public.processInputProc = CoreProcessKeyboardEvent;
- dev->public.realInputProc = CoreProcessKeyboardEvent;
- if (!noXkbExtension)
- XkbSetExtension(dev, ProcessKeyboardEvent);
+ XkbSetExtension(dev, ProcessKeyboardEvent);
}
#endif
- RegisterOtherDevice(dev);
if (serverGeneration == 1)
xf86Msg(X_INFO, "XINPUT: Adding extended input device \"%s\" (type: %s)\n",