From de1a8b68eb10c39a0d4a197107d68d7cc009edb2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 3 Nov 2008 11:30:48 +1030 Subject: xkb: extract the correct device in XkbFilterEvents. If the event is an XI event, we need to work on the correct device, not on the VCK. Adds XIGetDevice(event) function to extract the device from an event. --- xkb/xkbEvents.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'xkb') diff --git a/xkb/xkbEvents.c b/xkb/xkbEvents.c index 335620baa..151849c70 100644 --- a/xkb/xkbEvents.c +++ b/xkb/xkbEvents.c @@ -37,6 +37,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include "inputstr.h" #include "windowstr.h" +#include "exevents.h" #include #include "xkb.h" @@ -811,6 +812,13 @@ int i, button_mask; DeviceIntPtr pXDev = inputInfo.keyboard; XkbSrvInfoPtr xkbi; + if (xE->u.u.type & EXTENSION_EVENT_BASE) + { + pXDev = XIGetDevice(xE); + if (!pXDev) + pXDev = inputInfo.keyboard; + } + xkbi= pXDev->key->xkbInfo; if ( pClient->xkbClientFlags & _XkbClientInitialized ) { if ((xkbDebugFlags&0x10)&& -- cgit v1.2.3