summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@redhat.com>2008-11-03 11:30:48 +1030
committerPeter Hutterer <peter.hutterer@redhat.com>2008-11-04 16:04:16 +1030
commitde1a8b68eb10c39a0d4a197107d68d7cc009edb2 (patch)
tree4acc1223eeee1f6afb256834a7d3c1eb70d19a05 /xkb
parentd97239956667f8181f30271759573b75bf455fbb (diff)
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.
Diffstat (limited to 'xkb')
-rw-r--r--xkb/xkbEvents.c8
1 files changed, 8 insertions, 0 deletions
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 <X11/extensions/XIproto.h>
#include "inputstr.h"
#include "windowstr.h"
+#include "exevents.h"
#include <xkbsrv.h>
#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)&&