diff options
author | Peter Hutterer <peter.hutterer@redhat.com> | 2008-11-26 12:20:00 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@redhat.com> | 2008-12-02 15:50:37 +1000 |
commit | a425abf0eaa61ee5ccb2f32a1af24edd190f7889 (patch) | |
tree | fd94458bbf1357288cce20086c6f9f274ee8e83e /xkb/xkbEvents.c | |
parent | a85f0d6b98237d8a196de624207acf1983a1859a (diff) |
xkb: don't attempt to filter events for devices without key classes.
Reported by Magnus Kessler.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Diffstat (limited to 'xkb/xkbEvents.c')
-rw-r--r-- | xkb/xkbEvents.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/xkb/xkbEvents.c b/xkb/xkbEvents.c index fe44ee99a..c06b852fe 100644 --- a/xkb/xkbEvents.c +++ b/xkb/xkbEvents.c @@ -819,7 +819,8 @@ XkbSrvInfoPtr xkbi; pXDev = inputInfo.keyboard; } - xkbi= pXDev->key->xkbInfo; + xkbi= (pXDev->key) ? pXDev->key->xkbInfo : NULL; + if ( pClient->xkbClientFlags & _XkbClientInitialized ) { if ((xkbDebugFlags&0x10)&& ((xE[0].u.u.type==KeyPress)||(xE[0].u.u.type==KeyRelease)|| @@ -841,6 +842,10 @@ XkbSrvInfoPtr xkbi; (_XkbIsReleaseEvent(xE[0].u.u.type)) ) { return False; } + + if (!xkbi) + return True; + if ((pXDev->deviceGrab.grab != NullGrab) && pXDev->deviceGrab.fromPassiveGrab && ((xE[0].u.u.type==KeyPress)||(xE[0].u.u.type==KeyRelease)|| @@ -884,6 +889,9 @@ XkbSrvInfoPtr xkbi; else { register CARD8 type; + if (!xkbi) + return True; + for (i=0;i<nEvents;i++) { type= xE[i].u.u.type; if ((xkbDebugFlags&0x4)&& |