summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2006-06-01 20:56:39 +0000
committerDaniel Stone <daniel@fooishbar.org>2006-06-01 20:56:39 +0000
commitdf6da66525836d515f408a82f1a13ca5251ff0f7 (patch)
tree51a8878f8e0fd0b242ead7ab6d4e38de57f42c12 /xkb
parent97203f1cf6e5b7c6389f69cbb1b75ac675d09531 (diff)
Simplify the unsupported XI function list.
Diffstat (limited to 'xkb')
-rw-r--r--xkb/xkb.c83
-rw-r--r--xkb/xkbLEDs.c24
2 files changed, 26 insertions, 81 deletions
diff --git a/xkb/xkb.c b/xkb/xkb.c
index 642051020..7119bb0d4 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -54,12 +54,6 @@ Atom xkbKEYPAD;
CARD32 xkbDebugFlags = 0;
CARD32 xkbDebugCtrls = 0;
-#ifndef XKB_SRV_UNSUPPORTED_XI_FEATURES
-#define XKB_SRV_UNSUPPORTED_XI_FEATURES XkbXI_KeyboardsMask
-#endif
-
-unsigned XkbXIUnsupported= XKB_SRV_UNSUPPORTED_XI_FEATURES;
-
RESTYPE RT_XKBCLIENT;
/***====================================================================***/
@@ -175,11 +169,6 @@ ProcXkbUseExtension(ClientPtr client)
}
else supported = 1;
-#ifdef XKB_SWAPPING_BUSTED
- if (client->swapped)
- supported= 0;
-#endif
-
if ((supported) && (!(client->xkbClientFlags&_XkbClientInitialized))) {
client->xkbClientFlags= _XkbClientInitialized;
client->vMajor= stuff->wantedMajor;
@@ -2959,7 +2948,6 @@ ProcXkbGetNamedIndicator(ClientPtr client)
register int i = 0;
XkbSrvLedInfoPtr sli;
XkbIndicatorMapPtr map = NULL;
- Bool supported;
REQUEST(xkbGetNamedIndicatorReq);
REQUEST_SIZE_MATCH(xkbGetNamedIndicatorReq);
@@ -2974,25 +2962,15 @@ ProcXkbGetNamedIndicator(ClientPtr client)
if (!sli)
return BadAlloc;
- supported= True;
- if (XkbXIUnsupported&XkbXI_IndicatorsMask) {
- if ((dev!=(DeviceIntPtr)LookupKeyboardDevice())||
- ((sli->flags&XkbSLI_IsDefault)==0)) {
- supported= False;
- }
- }
-
- if (supported) {
- i= 0;
- map= NULL;
- if ((sli->names)&&(sli->maps)) {
- for (i=0;i<XkbNumIndicators;i++) {
- if (stuff->indicator==sli->names[i]) {
- map= &sli->maps[i];
- break;
- }
- }
- }
+ i= 0;
+ map= NULL;
+ if ((sli->names)&&(sli->maps)) {
+ for (i=0;i<XkbNumIndicators;i++) {
+ if (stuff->indicator==sli->names[i]) {
+ map= &sli->maps[i];
+ break;
+ }
+ }
}
rep.type= X_Reply;
@@ -3000,7 +2978,7 @@ ProcXkbGetNamedIndicator(ClientPtr client)
rep.sequenceNumber = client->sequence;
rep.deviceID = dev->id;
rep.indicator= stuff->indicator;
- if ((map!=NULL)&&(supported)) {
+ if (map!=NULL) {
rep.found= True;
rep.on= ((sli->effectiveState&(1<<i))!=0);
rep.realIndicator= ((sli->physIndicators&(1<<i))!=0);
@@ -3028,7 +3006,7 @@ ProcXkbGetNamedIndicator(ClientPtr client)
rep.realMods= 0;
rep.virtualMods= 0;
rep.ctrls= 0;
- rep.supported= supported;
+ rep.supported= True;
}
if ( client->swapped ) {
register int n;
@@ -3040,21 +3018,6 @@ ProcXkbGetNamedIndicator(ClientPtr client)
}
WriteToClient(client,SIZEOF(xkbGetNamedIndicatorReply), (char *)&rep);
- if (!supported) {
- xkbExtensionDeviceNotify edev;
-
- bzero(&edev,sizeof(xkbExtensionDeviceNotify));
- edev.reason= XkbXI_UnsupportedFeatureMask;
- edev.ledClass= stuff->ledClass;
- edev.ledID= stuff->ledID;
- edev.ledsDefined= sli->namesPresent|sli->mapsPresent;
- edev.ledState= sli->effectiveState;
- edev.firstBtn= 0;
- edev.nBtns= 0;
- edev.unsupported= XkbXIUnsupported&XkbXI_IndicatorsMask;
- edev.supported= XkbXI_AllFeaturesMask&(~XkbXIUnsupported);
- XkbSendExtensionDeviceNotify(dev,client,&edev);
- }
return client->noClientException;
}
@@ -3089,24 +3052,6 @@ ProcXkbSetNamedIndicator(ClientPtr client)
if (!sli)
return BadAlloc;
- if (XkbXIUnsupported&XkbXI_IndicatorsMask) {
- if ((dev!=(DeviceIntPtr)LookupKeyboardDevice())||
- ((sli->flags&XkbSLI_IsDefault)==0)) {
- bzero(&ed,sizeof(xkbExtensionDeviceNotify));
- ed.reason= XkbXI_UnsupportedFeatureMask;
- ed.ledClass= stuff->ledClass;
- ed.ledID= stuff->ledID;
- ed.ledsDefined= sli->namesPresent|sli->mapsPresent;
- ed.ledState= sli->effectiveState;
- ed.firstBtn= 0;
- ed.nBtns= 0;
- ed.unsupported= XkbXIUnsupported&XkbXI_IndicatorsMask;
- ed.supported= XkbXI_AllFeaturesMask&(~XkbXIUnsupported);
- XkbSendExtensionDeviceNotify(dev,client,&ed);
- return client->noClientException;
- }
- }
-
statec= mapc= namec= 0;
map= NULL;
if (sli->names && sli->maps) {
@@ -5691,7 +5636,7 @@ char * str;
wanted&= ~XkbXI_ButtonActionsMask;
if ((!dev->kbdfeed)&&(!dev->leds))
wanted&= ~XkbXI_IndicatorsMask;
- wanted&= ~XkbXIUnsupported;
+ wanted&= ~XkbXI_KeyboardsMask;
nameLen= XkbSizeCountedString(dev->name);
bzero((char *)&rep,SIZEOF(xkbGetDeviceInfoReply));
@@ -5700,8 +5645,8 @@ char * str;
rep.sequenceNumber = client->sequence;
rep.length = nameLen/4;
rep.present = wanted;
- rep.supported = XkbXI_AllDeviceFeaturesMask&(~XkbXIUnsupported);
- rep.unsupported = XkbXIUnsupported;
+ rep.supported = XkbXI_AllDeviceFeaturesMask&(~XkbXI_KeyboardsMask);
+ rep.unsupported = XkbXI_KeyboardsMask;
rep.firstBtnWanted = rep.nBtnsWanted = 0;
rep.firstBtnRtrn = rep.nBtnsRtrn = 0;
if (dev->button)
diff --git a/xkb/xkbLEDs.c b/xkb/xkbLEDs.c
index e04c05f14..6e5c3a199 100644
--- a/xkb/xkbLEDs.c
+++ b/xkb/xkbLEDs.c
@@ -677,13 +677,13 @@ xkbExtensionDeviceNotify my_ed;
changes->names.changed_indicators|= changed_names;
}
- ed->reason|= (XkbXI_IndicatorNamesMask&(~XkbXIUnsupported));
+ ed->reason|= (XkbXI_IndicatorNamesMask&(~XkbXI_KeyboardsMask));
ed->ledClass= sli->class;
ed->ledID= sli->id;
ed->ledsDefined= sli->namesPresent|sli->mapsPresent;
ed->ledState= sli->effectiveState;
- ed->unsupported|= XkbXIUnsupported&XkbXI_IndicatorNamesMask;
- ed->supported= XkbXI_AllFeaturesMask&(~XkbXIUnsupported);
+ ed->unsupported= XkbXI_KeyboardsMask;
+ ed->supported= XkbXI_AllFeaturesMask&(~XkbXI_KeyboardsMask);
if (changes!=&my_changes) changes= NULL;
if (ed!=&my_ed) ed= NULL;
@@ -755,13 +755,13 @@ xkbExtensionDeviceNotify my_ed;
XkbCheckIndicatorMaps(dev,sli,changed_maps);
- ed->reason|= (XkbXI_IndicatorMapsMask&(~XkbXIUnsupported));
+ ed->reason|= (XkbXI_IndicatorMapsMask&(~XkbXI_KeyboardsMask));
ed->ledClass= sli->class;
ed->ledID= sli->id;
ed->ledsDefined= sli->namesPresent|sli->mapsPresent;
ed->ledState= sli->effectiveState;
- ed->unsupported|= XkbXIUnsupported&XkbXI_IndicatorMapsMask;
- ed->supported= XkbXI_AllFeaturesMask&(~XkbXIUnsupported);
+ ed->unsupported|= XkbXI_KeyboardsMask&XkbXI_IndicatorMapsMask;
+ ed->supported= XkbXI_AllFeaturesMask&(~XkbXI_KeyboardsMask);
XkbUpdateLedAutoState(dev,sli,changed_maps,ed,changes,cause);
@@ -836,13 +836,13 @@ Bool kb_changed;
if ((kbd==dev)&&(sli->flags&XkbSLI_IsDefault))
changes->indicators.state_changes|= affected;
if (affected) {
- ed->reason|= (XkbXI_IndicatorStateMask&(~XkbXIUnsupported));
+ ed->reason|= (XkbXI_IndicatorStateMask&(~XkbXI_KeyboardsMask));
ed->ledClass= sli->class;
ed->ledID= sli->id;
ed->ledsDefined= sli->namesPresent|sli->mapsPresent;
ed->ledState= sli->effectiveState;
- ed->unsupported|= XkbXIUnsupported&XkbXI_IndicatorStateMask;
- ed->supported= XkbXI_AllFeaturesMask&(~XkbXIUnsupported);
+ ed->unsupported|= XkbXI_KeyboardsMask&XkbXI_IndicatorStateMask;
+ ed->supported= XkbXI_AllFeaturesMask&(~XkbXI_KeyboardsMask);
}
if (kb_changed) {
@@ -920,13 +920,13 @@ unsigned oldState;
changes->indicators.state_changes|= affected;
}
- ed->reason|= (XkbXI_IndicatorStateMask&(~XkbXIUnsupported));
+ ed->reason|= (XkbXI_IndicatorStateMask&(~XkbXI_KeyboardsMask));
ed->ledClass= sli->class;
ed->ledID= sli->id;
ed->ledsDefined= sli->namesPresent|sli->mapsPresent;
ed->ledState= sli->effectiveState;
- ed->unsupported|= XkbXIUnsupported&XkbXI_IndicatorStateMask;
- ed->supported= XkbXI_AllFeaturesMask&(~XkbXIUnsupported);
+ ed->unsupported|= XkbXI_KeyboardsMask&XkbXI_IndicatorStateMask;
+ ed->supported= XkbXI_AllFeaturesMask&(~XkbXI_KeyboardsMask);
if (changes!=&my_changes) changes= NULL;
if (ed!=&my_ed) ed= NULL;