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>
This commit is contained in:
Peter Hutterer 2008-11-26 12:20:00 +10:00
parent 41471afa77
commit 862d5b2dc5

View File

@ -826,7 +826,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)||
@ -848,6 +849,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)||
@ -891,6 +896,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)&&