XKB: Remove unsupported Xi operation flags

We support every XKB operation on Xi devices, so always report that we
support everything, and that nothing is ever unsupported.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Daniel Stone 2008-04-25 18:45:37 +03:00
parent 32db27a7f8
commit cc5c6d628a
4 changed files with 9 additions and 34 deletions

View File

@ -5964,10 +5964,8 @@ Bool classOk;
}
}
if (nFBs>0) {
if (rep->supported&XkbXI_IndicatorsMask) {
rep->nDeviceLedFBs= nFBs;
rep->length+= (length/4);
}
rep->nDeviceLedFBs= nFBs;
rep->length+= (length/4);
return Success;
}
if (classOk) client->errorValue= _XkbErrCode2(XkbErr_BadId,id);
@ -6091,7 +6089,7 @@ xkbGetDeviceInfoReply rep;
int status,nDeviceLedFBs;
unsigned length,nameLen;
CARD16 ledClass,ledID;
unsigned wanted,supported;
unsigned wanted;
char * str;
REQUEST(xkbGetDeviceInfoReq);
@ -6182,7 +6180,6 @@ char * str;
return status;
}
length= rep.length*4;
supported= rep.supported;
nDeviceLedFBs = rep.nDeviceLedFBs;
if (client->swapped) {
register int n;
@ -6222,19 +6219,6 @@ char * str;
ErrorF("[xkb] Wrote %d fewer bytes than expected\n",length);
return BadLength;
}
if (stuff->wanted&(~supported)) {
xkbExtensionDeviceNotify ed;
bzero((char *)&ed,SIZEOF(xkbExtensionDeviceNotify));
ed.ledClass= ledClass;
ed.ledID= ledID;
ed.ledsDefined= 0;
ed.ledState= 0;
ed.firstBtn= ed.nBtns= 0;
ed.reason= XkbXI_UnsupportedFeatureMask;
ed.supported= supported;
ed.unsupported= stuff->wanted&(~supported);
XkbSendExtensionDeviceNotify(dev,client,&ed);
}
return client->noClientException;
}

View File

@ -667,7 +667,7 @@ int initialized;
XkbInterestPtr interest;
Time time = 0;
CARD32 defined, state;
CARD16 reason, supported = 0;
CARD16 reason;
interest = dev->xkb_interest;
if (!interest)
@ -688,7 +688,6 @@ CARD16 reason, supported = 0;
pEv->deviceID = dev->id;
pEv->sequenceNumber = interest->client->sequence;
pEv->time = time = GetTimeInMillis();
supported= pEv->supported;
initialized= 1;
}
else {
@ -697,14 +696,7 @@ CARD16 reason, supported = 0;
pEv->ledsDefined= defined;
pEv->ledState= state;
pEv->reason= reason;
pEv->supported= supported;
}
if (client!=interest->client) {
/* only report UnsupportedFeature to the client that */
/* issued the failing request */
pEv->reason&= ~XkbXI_UnsupportedFeatureMask;
if ((interest->extDevNotifyMask&reason)==0)
continue;
pEv->supported= XkbXI_AllFeaturesMask;
}
if ( interest->client->swapped ) {
register int n;

View File

@ -283,7 +283,7 @@ unsigned oldState;
ed->ledID= sli->id;
ed->ledsDefined= sli->namesPresent|sli->mapsPresent;
ed->ledState= sli->effectiveState;
ed->unsupported|= XkbXI_IndicatorStateMask;
ed->unsupported= 0;
ed->supported= XkbXI_AllFeaturesMask;
if (changes!=&my_changes) changes= NULL;
@ -875,7 +875,7 @@ xkbExtensionDeviceNotify my_ed;
ed->ledID= sli->id;
ed->ledsDefined= sli->namesPresent|sli->mapsPresent;
ed->ledState= sli->effectiveState;
ed->unsupported|= XkbXI_IndicatorMapsMask;
ed->unsupported= 0;
ed->supported= XkbXI_AllFeaturesMask;
XkbUpdateLedAutoState(dev,sli,changed_maps,ed,changes,cause);
@ -956,7 +956,7 @@ Bool kb_changed;
ed->ledID= sli->id;
ed->ledsDefined= sli->namesPresent|sli->mapsPresent;
ed->ledState= sli->effectiveState;
ed->unsupported|= XkbXI_IndicatorStateMask;
ed->unsupported= 0;
ed->supported= XkbXI_AllFeaturesMask;
}

View File

@ -711,8 +711,7 @@ unsigned char grp;
if (!state || !ctrls)
return;
state->mods= (state->base_mods|state->latched_mods);
state->mods|= state->locked_mods;
state->mods= (state->base_mods|state->latched_mods|state->locked_mods);
state->lookup_mods= state->mods&(~ctrls->internal.mask);
state->grab_mods= state->lookup_mods&(~ctrls->ignore_lock.mask);
state->grab_mods|=