diff options
author | Daniel Stone <daniel@fooishbar.org> | 2008-04-25 18:45:37 +0300 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2009-01-22 15:08:56 +1100 |
commit | cc5c6d628aa0dc87c2cc9d063972e09ad747a596 (patch) | |
tree | fecb1859e652b7f15751a40aa1b420c949b4e009 /xkb | |
parent | 32db27a7f867b503c2840ca7b815e96d10be9210 (diff) |
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>
Diffstat (limited to 'xkb')
-rw-r--r-- | xkb/xkb.c | 22 | ||||
-rw-r--r-- | xkb/xkbEvents.c | 12 | ||||
-rw-r--r-- | xkb/xkbLEDs.c | 6 | ||||
-rw-r--r-- | xkb/xkbUtils.c | 3 |
4 files changed, 9 insertions, 34 deletions
@@ -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; } diff --git a/xkb/xkbEvents.c b/xkb/xkbEvents.c index 96e527baa..ed80b047c 100644 --- a/xkb/xkbEvents.c +++ b/xkb/xkbEvents.c @@ -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; diff --git a/xkb/xkbLEDs.c b/xkb/xkbLEDs.c index 68ab5ff4c..c61296b18 100644 --- a/xkb/xkbLEDs.c +++ b/xkb/xkbLEDs.c @@ -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; } diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c index f84e89206..d03195f05 100644 --- a/xkb/xkbUtils.c +++ b/xkb/xkbUtils.c @@ -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|= |