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:
parent
32db27a7f8
commit
cc5c6d628a
18
xkb/xkb.c
18
xkb/xkb.c
|
@ -5964,10 +5964,8 @@ Bool classOk;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (nFBs>0) {
|
if (nFBs>0) {
|
||||||
if (rep->supported&XkbXI_IndicatorsMask) {
|
|
||||||
rep->nDeviceLedFBs= nFBs;
|
rep->nDeviceLedFBs= nFBs;
|
||||||
rep->length+= (length/4);
|
rep->length+= (length/4);
|
||||||
}
|
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
if (classOk) client->errorValue= _XkbErrCode2(XkbErr_BadId,id);
|
if (classOk) client->errorValue= _XkbErrCode2(XkbErr_BadId,id);
|
||||||
|
@ -6091,7 +6089,7 @@ xkbGetDeviceInfoReply rep;
|
||||||
int status,nDeviceLedFBs;
|
int status,nDeviceLedFBs;
|
||||||
unsigned length,nameLen;
|
unsigned length,nameLen;
|
||||||
CARD16 ledClass,ledID;
|
CARD16 ledClass,ledID;
|
||||||
unsigned wanted,supported;
|
unsigned wanted;
|
||||||
char * str;
|
char * str;
|
||||||
|
|
||||||
REQUEST(xkbGetDeviceInfoReq);
|
REQUEST(xkbGetDeviceInfoReq);
|
||||||
|
@ -6182,7 +6180,6 @@ char * str;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
length= rep.length*4;
|
length= rep.length*4;
|
||||||
supported= rep.supported;
|
|
||||||
nDeviceLedFBs = rep.nDeviceLedFBs;
|
nDeviceLedFBs = rep.nDeviceLedFBs;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
register int n;
|
register int n;
|
||||||
|
@ -6222,19 +6219,6 @@ char * str;
|
||||||
ErrorF("[xkb] Wrote %d fewer bytes than expected\n",length);
|
ErrorF("[xkb] Wrote %d fewer bytes than expected\n",length);
|
||||||
return BadLength;
|
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;
|
return client->noClientException;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -667,7 +667,7 @@ int initialized;
|
||||||
XkbInterestPtr interest;
|
XkbInterestPtr interest;
|
||||||
Time time = 0;
|
Time time = 0;
|
||||||
CARD32 defined, state;
|
CARD32 defined, state;
|
||||||
CARD16 reason, supported = 0;
|
CARD16 reason;
|
||||||
|
|
||||||
interest = dev->xkb_interest;
|
interest = dev->xkb_interest;
|
||||||
if (!interest)
|
if (!interest)
|
||||||
|
@ -688,7 +688,6 @@ CARD16 reason, supported = 0;
|
||||||
pEv->deviceID = dev->id;
|
pEv->deviceID = dev->id;
|
||||||
pEv->sequenceNumber = interest->client->sequence;
|
pEv->sequenceNumber = interest->client->sequence;
|
||||||
pEv->time = time = GetTimeInMillis();
|
pEv->time = time = GetTimeInMillis();
|
||||||
supported= pEv->supported;
|
|
||||||
initialized= 1;
|
initialized= 1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -697,14 +696,7 @@ CARD16 reason, supported = 0;
|
||||||
pEv->ledsDefined= defined;
|
pEv->ledsDefined= defined;
|
||||||
pEv->ledState= state;
|
pEv->ledState= state;
|
||||||
pEv->reason= reason;
|
pEv->reason= reason;
|
||||||
pEv->supported= supported;
|
pEv->supported= XkbXI_AllFeaturesMask;
|
||||||
}
|
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
if ( interest->client->swapped ) {
|
if ( interest->client->swapped ) {
|
||||||
register int n;
|
register int n;
|
||||||
|
|
|
@ -283,7 +283,7 @@ unsigned oldState;
|
||||||
ed->ledID= sli->id;
|
ed->ledID= sli->id;
|
||||||
ed->ledsDefined= sli->namesPresent|sli->mapsPresent;
|
ed->ledsDefined= sli->namesPresent|sli->mapsPresent;
|
||||||
ed->ledState= sli->effectiveState;
|
ed->ledState= sli->effectiveState;
|
||||||
ed->unsupported|= XkbXI_IndicatorStateMask;
|
ed->unsupported= 0;
|
||||||
ed->supported= XkbXI_AllFeaturesMask;
|
ed->supported= XkbXI_AllFeaturesMask;
|
||||||
|
|
||||||
if (changes!=&my_changes) changes= NULL;
|
if (changes!=&my_changes) changes= NULL;
|
||||||
|
@ -875,7 +875,7 @@ xkbExtensionDeviceNotify my_ed;
|
||||||
ed->ledID= sli->id;
|
ed->ledID= sli->id;
|
||||||
ed->ledsDefined= sli->namesPresent|sli->mapsPresent;
|
ed->ledsDefined= sli->namesPresent|sli->mapsPresent;
|
||||||
ed->ledState= sli->effectiveState;
|
ed->ledState= sli->effectiveState;
|
||||||
ed->unsupported|= XkbXI_IndicatorMapsMask;
|
ed->unsupported= 0;
|
||||||
ed->supported= XkbXI_AllFeaturesMask;
|
ed->supported= XkbXI_AllFeaturesMask;
|
||||||
|
|
||||||
XkbUpdateLedAutoState(dev,sli,changed_maps,ed,changes,cause);
|
XkbUpdateLedAutoState(dev,sli,changed_maps,ed,changes,cause);
|
||||||
|
@ -956,7 +956,7 @@ Bool kb_changed;
|
||||||
ed->ledID= sli->id;
|
ed->ledID= sli->id;
|
||||||
ed->ledsDefined= sli->namesPresent|sli->mapsPresent;
|
ed->ledsDefined= sli->namesPresent|sli->mapsPresent;
|
||||||
ed->ledState= sli->effectiveState;
|
ed->ledState= sli->effectiveState;
|
||||||
ed->unsupported|= XkbXI_IndicatorStateMask;
|
ed->unsupported= 0;
|
||||||
ed->supported= XkbXI_AllFeaturesMask;
|
ed->supported= XkbXI_AllFeaturesMask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -711,8 +711,7 @@ unsigned char grp;
|
||||||
if (!state || !ctrls)
|
if (!state || !ctrls)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
state->mods= (state->base_mods|state->latched_mods);
|
state->mods= (state->base_mods|state->latched_mods|state->locked_mods);
|
||||||
state->mods|= state->locked_mods;
|
|
||||||
state->lookup_mods= state->mods&(~ctrls->internal.mask);
|
state->lookup_mods= state->mods&(~ctrls->internal.mask);
|
||||||
state->grab_mods= state->lookup_mods&(~ctrls->ignore_lock.mask);
|
state->grab_mods= state->lookup_mods&(~ctrls->ignore_lock.mask);
|
||||||
state->grab_mods|=
|
state->grab_mods|=
|
||||||
|
|
Loading…
Reference in New Issue
Block a user