From d627061b48ae06d27b37be209d67a3f4f2388dd3 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 6 Sep 2007 18:57:00 +0930 Subject: [PATCH] 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. --- hw/xfree86/common/xf86Xinput.c | 13 ++++--------- 1 file 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",