Lines Matching defs:stuff
156 _XkbCheckRequestBounds(ClientPtr client, void *stuff, void *from, void *to) {
157 char *cstuff = (char *)stuff;
178 if (stuff->wantedMajor != SERVER_XKB_MAJOR_VERSION) {
181 (stuff->wantedMajor == 0) && (stuff->wantedMinor == 65));
188 if (stuff->wantedMajor == 0)
194 client->index, (long) client->clientAsMask, stuff->wantedMajor,
195 stuff->wantedMinor, SERVER_XKB_MAJOR_VERSION,
231 CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixUseAccess);
233 if (((stuff->affectWhich & XkbMapNotifyMask) != 0) && (stuff->affectMap)) {
234 client->mapNotifyMask &= ~stuff->affectMap;
235 client->mapNotifyMask |= (stuff->affectMap & stuff->map);
237 if ((stuff->affectWhich & (~XkbMapNotifyMask)) == 0)
256 from.c8 = (CARD8 *) &stuff[1];
257 dataLeft = (stuff->length * 4) - SIZEOF(xkbSelectEventsReq);
258 maskLeft = (stuff->affectWhich & (~XkbMapNotifyMask));
324 if (stuff->clear & bit) {
332 else if (stuff->selectAll & bit) {
504 CHK_BELL_DEVICE(dev, stuff->deviceSpec, client, DixBellAccess);
505 CHK_ATOM_OR_NONE(stuff->name);
508 if ((stuff->forceSound) && (stuff->eventOnly)) {
510 _XkbErrCode3(0x1, stuff->forceSound, stuff->eventOnly);
513 if (stuff->percent < -100 || stuff->percent > 100) {
514 client->errorValue = _XkbErrCode2(0x2, stuff->percent);
517 if (stuff->duration < -1) {
518 client->errorValue = _XkbErrCode2(0x3, stuff->duration);
521 if (stuff->pitch < -1) {
522 client->errorValue = _XkbErrCode2(0x4, stuff->pitch);
526 if (stuff->bellClass == XkbDfltXIClass) {
528 stuff->bellClass = KbdFeedbackClass;
530 stuff->bellClass = BellFeedbackClass;
533 if (stuff->window != None) {
534 rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
536 client->errorValue = stuff->window;
552 rc = _XkbBell(client, dev, pWin, stuff->bellClass, stuff->bellID,
553 stuff->pitch, stuff->duration, stuff->percent,
554 stuff->forceSound, stuff->eventOnly, stuff->name);
556 if ((rc == Success) && ((stuff->deviceSpec == XkbUseCoreKbd) ||
557 (stuff->deviceSpec == XkbUseCorePtr))) {
565 _XkbBell(client, other, pWin, stuff->bellClass,
566 stuff->bellID, stuff->pitch, stuff->duration,
567 stuff->percent, stuff->forceSound,
568 stuff->eventOnly, stuff->name);
592 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
637 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
638 CHK_MASK_MATCH(0x01, stuff->affectModLocks, stuff->modLocks);
639 CHK_MASK_MATCH(0x01, stuff->affectModLatches, stuff->modLatches);
651 if (stuff->affectModLocks) {
652 newState->locked_mods &= ~stuff->affectModLocks;
654 (stuff->affectModLocks & stuff->modLocks);
656 if (status == Success && stuff->lockGroup)
657 newState->locked_group = stuff->groupLock;
658 if (status == Success && stuff->affectModLatches)
659 status = XkbLatchModifiers(tmpd, stuff->affectModLatches,
660 stuff->modLatches);
661 if (status == Success && stuff->latchGroup)
662 status = XkbLatchGroup(tmpd, stuff->groupLatch);
704 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
783 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
784 CHK_MASK_LEGAL(0x01, stuff->changeCtrls, XkbAllControlsMask);
796 if (stuff->changeCtrls & XkbInternalModsMask) {
797 CHK_MASK_MATCH(0x02, stuff->affectInternalMods,
798 stuff->internalMods);
799 CHK_MASK_MATCH(0x03, stuff->affectInternalVMods,
800 stuff->internalVMods);
802 new.internal.real_mods &= ~(stuff->affectInternalMods);
803 new.internal.real_mods |= (stuff->affectInternalMods &
804 stuff->internalMods);
805 new.internal.vmods &= ~(stuff->affectInternalVMods);
806 new.internal.vmods |= (stuff->affectInternalVMods &
807 stuff->internalVMods);
812 if (stuff->changeCtrls & XkbIgnoreLockModsMask) {
813 CHK_MASK_MATCH(0x4, stuff->affectIgnoreLockMods,
814 stuff->ignoreLockMods);
815 CHK_MASK_MATCH(0x5, stuff->affectIgnoreLockVMods,
816 stuff->ignoreLockVMods);
818 new.ignore_lock.real_mods &= ~(stuff->affectIgnoreLockMods);
819 new.ignore_lock.real_mods |= (stuff->affectIgnoreLockMods &
820 stuff->ignoreLockMods);
821 new.ignore_lock.vmods &= ~(stuff->affectIgnoreLockVMods);
822 new.ignore_lock.vmods |= (stuff->affectIgnoreLockVMods &
823 stuff->ignoreLockVMods);
828 CHK_MASK_MATCH(0x06, stuff->affectEnabledCtrls,
829 stuff->enabledCtrls);
830 if (stuff->affectEnabledCtrls) {
831 CHK_MASK_LEGAL(0x07, stuff->affectEnabledCtrls,
834 new.enabled_ctrls &= ~(stuff->affectEnabledCtrls);
835 new.enabled_ctrls |= (stuff->affectEnabledCtrls &
836 stuff->enabledCtrls);
839 if (stuff->changeCtrls & XkbRepeatKeysMask) {
840 if (stuff->repeatDelay < 1 || stuff->repeatInterval < 1) {
841 client->errorValue = _XkbErrCode3(0x08, stuff->repeatDelay,
842 stuff->repeatInterval);
846 new.repeat_delay = stuff->repeatDelay;
847 new.repeat_interval = stuff->repeatInterval;
850 if (stuff->changeCtrls & XkbSlowKeysMask) {
851 if (stuff->slowKeysDelay < 1) {
853 stuff->slowKeysDelay);
857 new.slow_keys_delay = stuff->slowKeysDelay;
860 if (stuff->changeCtrls & XkbBounceKeysMask) {
861 if (stuff->debounceDelay < 1) {
863 stuff->debounceDelay);
867 new.debounce_delay = stuff->debounceDelay;
870 if (stuff->changeCtrls & XkbMouseKeysMask) {
871 if (stuff->mkDfltBtn > XkbMaxMouseKeysBtn) {
872 client->errorValue = _XkbErrCode2(0x0B, stuff->mkDfltBtn);
876 new.mk_dflt_btn = stuff->mkDfltBtn;
879 if (stuff->changeCtrls & XkbMouseKeysAccelMask) {
880 if (stuff->mkDelay < 1 || stuff->mkInterval < 1 ||
881 stuff->mkTimeToMax < 1 || stuff->mkMaxSpeed < 1 ||
882 stuff->mkCurve < -1000) {
887 new.mk_delay = stuff->mkDelay;
888 new.mk_interval = stuff->mkInterval;
889 new.mk_time_to_max = stuff->mkTimeToMax;
890 new.mk_max_speed = stuff->mkMaxSpeed;
891 new.mk_curve = stuff->mkCurve;
895 if (stuff->changeCtrls & XkbGroupsWrapMask) {
898 act = XkbOutOfRangeGroupAction(stuff->groupsWrap);
901 num = XkbOutOfRangeGroupNumber(stuff->groupsWrap);
915 new.groups_wrap = stuff->groupsWrap;
918 CHK_MASK_LEGAL(0x0F, stuff->axOptions, XkbAX_AllOptionsMask);
919 if (stuff->changeCtrls & XkbAccessXKeysMask) {
920 new.ax_options = stuff->axOptions & XkbAX_AllOptionsMask;
923 if (stuff->changeCtrls & XkbStickyKeysMask) {
925 new.ax_options |= (stuff->axOptions & XkbAX_SKOptionsMask);
928 if (stuff->changeCtrls & XkbAccessXFeedbackMask) {
930 new.ax_options |= (stuff->axOptions & XkbAX_FBOptionsMask);
934 if (stuff->changeCtrls & XkbAccessXTimeoutMask) {
935 if (stuff->axTimeout < 1) {
936 client->errorValue = _XkbErrCode2(0x10, stuff->axTimeout);
939 CHK_MASK_MATCH(0x11, stuff->axtCtrlsMask,
940 stuff->axtCtrlsValues);
941 CHK_MASK_LEGAL(0x12, stuff->axtCtrlsMask,
943 CHK_MASK_MATCH(0x13, stuff->axtOptsMask, stuff->axtOptsValues);
944 CHK_MASK_LEGAL(0x14, stuff->axtOptsMask, XkbAX_AllOptionsMask);
945 new.ax_timeout = stuff->axTimeout;
946 new.axt_ctrls_mask = stuff->axtCtrlsMask;
947 new.axt_ctrls_values = (stuff->axtCtrlsValues &
948 stuff->axtCtrlsMask);
949 new.axt_opts_mask = stuff->axtOptsMask;
950 new.axt_opts_values = (stuff->axtOptsValues &
951 stuff->axtOptsMask);
954 if (stuff->changeCtrls & XkbPerKeyRepeatMask) {
955 memcpy(new.per_key_repeat, stuff->perKeyRepeat,
1474 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
1475 CHK_MASK_OVERLAP(0x01, stuff->full, stuff->partial);
1476 CHK_MASK_LEGAL(0x02, stuff->full, XkbAllMapComponentsMask);
1477 CHK_MASK_LEGAL(0x03, stuff->partial, XkbAllMapComponentsMask);
1485 .present = stuff->partial | stuff->full,
1490 if (stuff->full & XkbKeyTypesMask) {
1494 else if (stuff->partial & XkbKeyTypesMask) {
1495 if (((unsigned) stuff->firstType + stuff->nTypes) > xkb->map->num_types) {
1497 stuff->firstType, stuff->nTypes);
1500 rep.firstType = stuff->firstType;
1501 rep.nTypes = stuff->nTypes;
1508 if (stuff->full & XkbKeySymsMask) {
1512 else if (stuff->partial & XkbKeySymsMask) {
1513 CHK_KEY_RANGE(0x05, stuff->firstKeySym, stuff->nKeySyms, xkb);
1514 rep.firstKeySym = stuff->firstKeySym;
1515 rep.nKeySyms = stuff->nKeySyms;
1521 if (stuff->full & XkbKeyActionsMask) {
1525 else if (stuff->partial & XkbKeyActionsMask) {
1526 CHK_KEY_RANGE(0x07, stuff->firstKeyAct, stuff->nKeyActs, xkb);
1527 rep.firstKeyAct = stuff->firstKeyAct;
1528 rep.nKeyActs = stuff->nKeyActs;
1534 if (stuff->full & XkbKeyBehaviorsMask) {
1538 else if (stuff->partial & XkbKeyBehaviorsMask) {
1539 CHK_KEY_RANGE(0x09, stuff->firstKeyBehavior, stuff->nKeyBehaviors, xkb);
1540 rep.firstKeyBehavior = stuff->firstKeyBehavior;
1541 rep.nKeyBehaviors = stuff->nKeyBehaviors;
1547 if (stuff->full & XkbVirtualModsMask)
1549 else if (stuff->partial & XkbVirtualModsMask)
1550 rep.virtualMods = stuff->virtualMods;
1552 if (stuff->full & XkbExplicitComponentsMask) {
1556 else if (stuff->partial & XkbExplicitComponentsMask) {
1557 CHK_KEY_RANGE(0x0B, stuff->firstKeyExplicit, stuff->nKeyExplicit, xkb);
1558 rep.firstKeyExplicit = stuff->firstKeyExplicit;
1559 rep.nKeyExplicit = stuff->nKeyExplicit;
1565 if (stuff->full & XkbModifierMapMask) {
1569 else if (stuff->partial & XkbModifierMapMask) {
1570 CHK_KEY_RANGE(0x0D, stuff->firstModMapKey, stuff->nModMapKeys, xkb);
1571 rep.firstModMapKey = stuff->firstModMapKey;
1572 rep.nModMapKeys = stuff->nModMapKeys;
1578 if (stuff->full & XkbVirtualModMapMask) {
1582 else if (stuff->partial & XkbVirtualModMapMask) {
1583 CHK_KEY_RANGE(0x0F, stuff->firstVModMapKey, stuff->nVModMapKeys, xkb);
1584 rep.firstVModMapKey = stuff->firstVModMapKey;
1585 rep.nVModMapKeys = stuff->nVModMapKeys;
2725 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
2726 CHK_MASK_LEGAL(0x01, stuff->present, XkbAllMapComponentsMask);
2729 rc = _XkbSetMapCheckLength(stuff);
2733 tmp = (char *) &stuff[1];
2738 rc = _XkbSetMapChecks(client, dev, stuff, tmp, TRUE);
2745 if (stuff->deviceSpec == XkbUseCoreKbd) {
2754 rc = _XkbSetMapChecks(client, other, stuff, tmp, FALSE);
2768 rc = _XkbSetMapChecks(client, other, stuff, tmp, FALSE);
2775 rc = _XkbSetMap(client, dev, stuff, tmp);
2779 if (stuff->deviceSpec == XkbUseCoreKbd) {
2788 _XkbSetMap(client, other, stuff, tmp);
2803 _XkbSetMap(client, other, stuff, tmp); //ignore rc
2914 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
2924 .firstSI = stuff->firstSI,
2925 .nSI = stuff->nSI
2927 if (stuff->getAllSI) {
2931 else if ((((unsigned) stuff->nSI) > 0) &&
2932 ((unsigned) (stuff->firstSI + stuff->nSI - 1) >= compat->num_si)) {
2937 rep.groups = stuff->groups;
3111 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
3113 data = (char *) &stuff[1];
3116 rc = _XkbSetCompatMap(client, dev, stuff, data, TRUE);
3119 if (stuff->deviceSpec == XkbUseCoreKbd) {
3129 rc = _XkbSetCompatMap(client, other, stuff, data, TRUE);
3138 rc = _XkbSetCompatMap(client, dev, stuff, data, FALSE);
3141 if (stuff->deviceSpec == XkbUseCoreKbd) {
3150 rc = _XkbSetCompatMap(client, other, stuff, data, FALSE);
3176 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixReadAccess);
3293 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
3303 .which = stuff->which
3370 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
3372 if (stuff->which == 0)
3376 if (stuff->which & bit)
3379 if (stuff->length != ((SIZEOF(xkbSetIndicatorMapReq) +
3385 from = (xkbIndicatorMapWireDesc *) &stuff[1];
3387 if (stuff->which & bit) {
3398 from = (xkbIndicatorMapWireDesc *) &stuff[1];
3399 rc = _XkbSetIndicatorMap(client, dev, stuff->which, from);
3403 if (stuff->deviceSpec == XkbUseCoreKbd) {
3412 _XkbSetIndicatorMap(client, other, stuff->which, from);
3437 CHK_LED_DEVICE(dev, stuff->deviceSpec, client, DixReadAccess);
3438 CHK_ATOM_ONLY(stuff->indicator);
3440 sli = XkbFindSrvLedInfo(dev, stuff->ledClass, stuff->ledID, 0);
3448 if (stuff->indicator == sli->names[i]) {
3460 .indicator = stuff->indicator
3576 xkbSetNamedIndicatorReq * stuff)
3589 rc = _XkbCreateIndicatorMap(dev, stuff->indicator, stuff->ledClass,
3590 stuff->ledID, &map, &led, FALSE);
3594 sli = XkbFindSrvLedInfo(dev, stuff->ledClass, stuff->ledID,
3603 sli->namesPresent |= ((stuff->indicator != None) ? (1 << led) : 0);
3606 if (stuff->setMap) {
3607 map->flags = stuff->flags;
3608 map->which_groups = stuff->whichGroups;
3609 map->groups = stuff->groups;
3610 map->which_mods = stuff->whichMods;
3611 map->mods.mask = stuff->realMods;
3612 map->mods.real_mods = stuff->realMods;
3613 map->mods.vmods = stuff->virtualMods;
3614 map->ctrls = stuff->ctrls;
3618 if ((stuff->setState) && ((map->flags & XkbIM_NoExplicit) == 0)) {
3619 if (stuff->on)
3658 CHK_LED_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
3659 CHK_ATOM_ONLY(stuff->indicator);
3660 CHK_MASK_LEGAL(0x10, stuff->whichGroups, XkbIM_UseAnyGroup);
3661 CHK_MASK_LEGAL(0x11, stuff->whichMods, XkbIM_UseAnyMods);
3664 rc = _XkbCreateIndicatorMap(dev, stuff->indicator,
3665 stuff->ledClass, stuff->ledID,
3670 if (stuff->deviceSpec == XkbUseCoreKbd ||
3671 stuff->deviceSpec == XkbUseCorePtr) {
3680 rc = _XkbCreateIndicatorMap(other, stuff->indicator,
3681 stuff->ledClass, stuff->ledID, &map,
3690 rc = _XkbSetNamedIndicator(client, dev, stuff);
3694 if (stuff->deviceSpec == XkbUseCoreKbd ||
3695 stuff->deviceSpec == XkbUseCorePtr) {
3704 _XkbSetNamedIndicator(client, other, stuff);
4033 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
4034 CHK_MASK_LEGAL(0x01, stuff->which, XkbAllNamesMask);
4042 .which = stuff->which,
4124 xkbSetNamesReq * stuff, CARD32 *data)
4133 if (stuff->which & XkbKeyTypeNamesMask) {
4137 if (stuff->nTypes < 1) {
4138 client->errorValue = _XkbErrCode2(0x02, stuff->nTypes);
4141 if ((unsigned) (stuff->firstType + stuff->nTypes - 1) >=
4144 _XkbErrCode4(0x03, stuff->firstType, stuff->nTypes,
4148 if (((unsigned) stuff->firstType) <= XkbLastRequiredType) {
4149 client->errorValue = _XkbErrCode2(0x04, stuff->firstType);
4152 if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + stuff->nTypes))
4155 tmp = _XkbCheckAtoms(tmp, stuff->nTypes, client->swapped, &bad);
4160 for (i = 0; i < stuff->nTypes; i++, old++) {
4161 if (!_XkbCheckTypeName((Atom) *old, stuff->firstType + i))
4165 if (stuff->which & XkbKTLevelNamesMask) {
4170 if (stuff->nKTLevels < 1) {
4171 client->errorValue = _XkbErrCode2(0x05, stuff->nKTLevels);
4174 if ((unsigned) (stuff->firstKTLevel + stuff->nKTLevels - 1) >=
4176 client->errorValue = _XkbErrCode4(0x06, stuff->firstKTLevel,
4177 stuff->nKTLevels,
4182 tmp = (CARD32 *) (((char *) tmp) + XkbPaddedSize(stuff->nKTLevels));
4183 if (!_XkbCheckRequestBounds(client, stuff, width, tmp))
4185 type = &xkb->map->types[stuff->firstKTLevel];
4186 for (i = 0; i < stuff->nKTLevels; i++, type++) {
4190 client->errorValue = _XkbErrCode4(0x07, i + stuff->firstKTLevel,
4194 if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + width[i]))
4203 if (stuff->which & XkbIndicatorNamesMask) {
4204 if (stuff->indicators == 0) {
4208 if (!_XkbCheckRequestBounds(client, stuff, tmp,
4209 tmp + Ones(stuff->indicators)))
4211 tmp = _XkbCheckMaskedAtoms(tmp, XkbNumIndicators, stuff->indicators,
4218 if (stuff->which & XkbVirtualModNamesMask) {
4219 if (stuff->virtualMods == 0) {
4223 if (!_XkbCheckRequestBounds(client, stuff, tmp,
4224 tmp + Ones(stuff->virtualMods)))
4227 (CARD32) stuff->virtualMods,
4234 if (stuff->which & XkbGroupNamesMask) {
4235 if (stuff->groupNames == 0) {
4239 if (!_XkbCheckRequestBounds(client, stuff, tmp,
4240 tmp + Ones(stuff->groupNames)))
4243 (CARD32) stuff->groupNames,
4250 if (stuff->which & XkbKeyNamesMask) {
4251 if (stuff->firstKey < (unsigned) xkb->min_key_code) {
4253 stuff->firstKey);
4256 if (((unsigned) (stuff->firstKey + stuff->nKeys - 1) >
4257 xkb->max_key_code) || (stuff->nKeys < 1)) {
4259 _XkbErrCode4(0x0c, xkb->max_key_code, stuff->firstKey,
4260 stuff->nKeys);
4263 if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + stuff->nKeys))
4265 tmp += stuff->nKeys;
4267 if ((stuff->which & XkbKeyAliasesMask) && (stuff->nKeyAliases > 0)) {
4268 if (!_XkbCheckRequestBounds(client, stuff, tmp,
4269 tmp + (stuff->nKeyAliases * 2)))
4271 tmp += stuff->nKeyAliases * 2;
4273 if (stuff->which & XkbRGNamesMask) {
4274 if (stuff->nRadioGroups < 1) {
4275 client->errorValue = _XkbErrCode2(0x0d, stuff->nRadioGroups);
4278 if (!_XkbCheckRequestBounds(client, stuff, tmp,
4279 tmp + stuff->nRadioGroups))
4281 tmp = _XkbCheckAtoms(tmp, stuff->nRadioGroups, client->swapped, &bad);
4287 if ((tmp - ((CARD32 *) stuff)) != stuff->length) {
4288 client->errorValue = stuff->length;
4296 _XkbSetNames(ClientPtr client, DeviceIntPtr dev, xkbSetNamesReq * stuff)
4303 tmp = (CARD32 *) &stuff[1];
4307 if (XkbAllocNames(xkb, stuff->which, stuff->nRadioGroups,
4308 stuff->nKeyAliases) != Success) {
4313 nn.changed = stuff->which;
4314 tmp = (CARD32 *) &stuff[1];
4315 if (stuff->which & XkbKeycodesNameMask)
4317 if (stuff->which & XkbGeometryNameMask)
4319 if (stuff->which & XkbSymbolsNameMask)
4321 if (stuff->which & XkbPhysSymbolsNameMask)
4323 if (stuff->which & XkbTypesNameMask)
4325 if (stuff->which & XkbCompatNameMask)
4327 if ((stuff->which & XkbKeyTypeNamesMask) && (stuff->nTypes > 0)) {
4331 type = &xkb->map->types[stuff->firstType];
4332 for (i = 0; i < stuff->nTypes; i++, type++) {
4335 nn.firstType = stuff->firstType;
4336 nn.nTypes = stuff->nTypes;
4338 if (stuff->which & XkbKTLevelNamesMask) {
4344 tmp = (CARD32 *) (((char *) tmp) + XkbPaddedSize(stuff->nKTLevels));
4345 type = &xkb->map->types[stuff->firstKTLevel];
4346 for (i = 0; i < stuff->nKTLevels; i++, type++) {
4359 nn.nLevelNames = stuff->nTypes;
4361 if (stuff->which & XkbIndicatorNamesMask) {
4363 stuff->indicators);
4364 nn.changedIndicators = stuff->indicators;
4366 if (stuff->which & XkbVirtualModNamesMask) {
4368 stuff->virtualMods);
4369 nn.changedVirtualMods = stuff->virtualMods;
4371 if (stuff->which & XkbGroupNamesMask) {
4373 stuff->groupNames);
4374 nn.changedVirtualMods = stuff->groupNames;
4376 if (stuff->which & XkbKeyNamesMask) {
4377 memcpy((char *) &names->keys[stuff->firstKey], (char *) tmp,
4378 stuff->nKeys * XkbKeyNameLength);
4379 tmp += stuff->nKeys;
4380 nn.firstKey = stuff->firstKey;
4381 nn.nKeys = stuff->nKeys;
4383 if (stuff->which & XkbKeyAliasesMask) {
4384 if (stuff->nKeyAliases > 0) {
4385 register int na = stuff->nKeyAliases;
4390 stuff->nKeyAliases * sizeof(XkbKeyAliasRec));
4391 tmp += stuff->nKeyAliases * 2;
4400 if (stuff->which & XkbRGNamesMask) {
4401 if (stuff->nRadioGroups > 0) {
4404 nrg = stuff->nRadioGroups;
4408 for (i = 0; i < stuff->nRadioGroups; i++) {
4411 tmp += stuff->nRadioGroups;
4468 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
4469 CHK_MASK_LEGAL(0x01, stuff->which, XkbAllNamesMask);
4471 /* check device-independent stuff */
4472 tmp = (CARD32 *) &stuff[1];
4474 if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + 1))
4476 if (stuff->which & XkbKeycodesNameMask) {
4483 if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + 1))
4485 if (stuff->which & XkbGeometryNameMask) {
4492 if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + 1))
4494 if (stuff->which & XkbSymbolsNameMask) {
4501 if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + 1))
4503 if (stuff->which & XkbPhysSymbolsNameMask) {
4510 if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + 1))
4512 if (stuff->which & XkbTypesNameMask) {
4519 if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + 1))
4521 if (stuff->which & XkbCompatNameMask) {
4530 rc = _XkbSetNamesCheck(client, dev, stuff, tmp);
4534 if (stuff->deviceSpec == XkbUseCoreKbd) {
4544 rc = _XkbSetNamesCheck(client, other, stuff, tmp);
4554 rc = _XkbSetNames(client, dev, stuff);
4558 if (stuff->deviceSpec == XkbUseCoreKbd) {
4568 _XkbSetNames(client, other, stuff);
5114 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
5115 CHK_ATOM_OR_NONE(stuff->name);
5117 geom = XkbLookupNamedGeometry(dev, stuff->name, &shouldFree);
5124 status = XkbComputeGetGeometryReplySize(geom, &rep, stuff->name);
5615 _XkbSetGeometry(ClientPtr client, DeviceIntPtr dev, xkbSetGeometryReq * stuff)
5629 sizes.num_properties = stuff->nProperties;
5630 sizes.num_colors = stuff->nColors;
5631 sizes.num_shapes = stuff->nShapes;
5632 sizes.num_sections = stuff->nSections;
5633 sizes.num_doodads = stuff->nDoodads;
5634 sizes.num_key_aliases = stuff->nKeyAliases;
5640 geom->name = stuff->name;
5641 geom->width_mm = stuff->widthMM;
5642 geom->height_mm = stuff->heightMM;
5643 if ((status = _CheckSetGeom(geom, stuff, client)) != Success) {
5681 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
5682 CHK_ATOM_OR_NONE(stuff->name);
5684 rc = _XkbSetGeometry(client, dev, stuff);
5688 if (stuff->deviceSpec == XkbUseCoreKbd) {
5697 _XkbSetGeometry(client, other, stuff);
5721 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, access_mode);
5722 CHK_MASK_LEGAL(0x01, stuff->change, XkbPCF_AllFlagsMask);
5723 CHK_MASK_MATCH(0x02, stuff->change, stuff->value);
5726 if (stuff->change) {
5727 client->xkbClientFlags &= ~stuff->change;
5728 client->xkbClientFlags |= stuff->value;
5730 if (stuff->change & XkbPCF_AutoResetControlsMask) {
5733 want = stuff->value & XkbPCF_AutoResetControlsMask;
5749 affect = stuff->ctrlsToChange;
5752 CHK_MASK_MATCH(0x04, affect, stuff->autoCtrls);
5753 CHK_MASK_MATCH(0x05, stuff->autoCtrls, stuff->autoCtrlValues);
5757 interest->autoCtrls |= stuff->autoCtrls & affect;
5758 interest->autoCtrlValues |= stuff->autoCtrlValues & affect;
5861 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
5867 str = (unsigned char *) &stuff[1];
5870 len = (str + size + 1) - ((unsigned char *) stuff);
5871 if ((XkbPaddedSize(len) / 4) > stuff->length)
5875 if ((XkbPaddedSize(len) / 4) != stuff->length)
5937 CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, access_mode);
5942 str = (unsigned char *) &stuff[1];
5956 len = str - ((unsigned char *) stuff);
5957 if ((XkbPaddedSize(len) / 4) != stuff->length)
5970 CHK_MASK_LEGAL(0x01, stuff->want, XkbGBN_AllComponentsMask);
5971 CHK_MASK_LEGAL(0x02, stuff->need, XkbGBN_AllComponentsMask);
5973 if (stuff->load)
5976 fwant = stuff->want | stuff->need;
6003 XkbConvertGetByNameComponents(TRUE, stuff->want) | XkmVirtualModsMask;
6004 fneed = XkbConvertGetByNameComponents(TRUE, stuff->need);
6006 if (stuff->load) {
6021 stuff->want |= stuff->need;
6025 if (stuff->load)
6027 if (stuff->load ||
6477 wanted = stuff->wanted;
6479 CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
6482 if ((!dev->button) || ((stuff->nBtns < 1) && (!stuff->allBtns)))
6508 ledClass = stuff->ledClass;
6509 ledID = stuff->ledID;
6512 if (stuff->allBtns) {
6513 stuff->firstBtn = 0;
6514 stuff->nBtns = dev->button->numButtons;
6517 if ((stuff->firstBtn + stuff->nBtns) > dev->button->numButtons) {
6519 stuff->firstBtn, stuff->nBtns);
6523 rep.firstBtnWanted = stuff->firstBtn;
6524 rep.nBtnsWanted = stuff->nBtns;
6529 rep.firstBtnRtrn = stuff->firstBtn;
6530 rep.nBtnsRtrn = stuff->nBtns;
6606 xkbSetDeviceInfoReq * stuff)
6614 if (!_XkbCheckRequestBounds(client, stuff, ledWire, ledWire + 1)) {
6646 if (!_XkbCheckRequestBounds(client, stuff, atomWire, atomWire + 1)) {
6662 if (!_XkbCheckRequestBounds(client, stuff, mapWire, mapWire + 1)) {
6696 xkbSetDeviceInfoReq * stuff)
6788 xkbSetDeviceInfoReq * stuff)
6792 wire = (char *) &stuff[1];
6793 if (stuff->change & XkbXI_ButtonActionsMask) {
6794 int sz = stuff->nBtns * SIZEOF(xkbActionWireDesc);
6795 if (!_XkbCheckRequestBounds(client, stuff, wire, (char *) wire + sz))
6802 if ((stuff->firstBtn + stuff->nBtns) > dev->button->numButtons) {
6804 _XkbErrCode4(0x02, stuff->firstBtn, stuff->nBtns,
6810 if (stuff->change & XkbXI_IndicatorsMask) {
6813 wire = CheckSetDeviceIndicators(wire, dev, stuff->nDeviceLedFBs,
6814 &status, client, stuff);
6818 if (((wire - ((char *) stuff)) / 4) != stuff->length)
6826 xkbSetDeviceInfoReq * stuff)
6833 wire = (char *) &stuff[1];
6834 if (stuff->change & XkbXI_ButtonActionsMask) {
6847 if (stuff->firstBtn + stuff->nBtns > nBtns)
6849 sz = stuff->nBtns * SIZEOF(xkbActionWireDesc);
6850 memcpy((char *) &acts[stuff->firstBtn], (char *) wire, sz);
6853 ed.firstBtn = stuff->firstBtn;
6854 ed.nBtns = stuff->nBtns;
6860 acts = &dev->button->xkb_acts[stuff->firstBtn];
6861 for (i = 0; i < stuff->nBtns; i++, acts++) {
6866 if (stuff->change & XkbXI_IndicatorsMask) {
6869 wire = SetDeviceIndicators(wire, dev, stuff->change,
6870 stuff->nDeviceLedFBs, &status, client, &ed,
6871 stuff);
6875 if ((stuff->change) && (ed.reason))
6892 CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
6893 CHK_MASK_LEGAL(0x01, stuff->change, XkbXI_AllFeaturesMask);
6895 rc = _XkbSetDeviceInfoCheck(client, dev, stuff);
6900 if (stuff->deviceSpec == XkbUseCoreKbd ||
6901 stuff->deviceSpec == XkbUseCorePtr) {
6907 ((stuff->deviceSpec == XkbUseCoreKbd && other->key) ||
6908 (stuff->deviceSpec == XkbUseCorePtr && other->button))) {
6912 rc = _XkbSetDeviceInfoCheck(client, other, stuff);
6921 rc = _XkbSetDeviceInfo(client, dev, stuff);
6925 if (stuff->deviceSpec == XkbUseCoreKbd ||
6926 stuff->deviceSpec == XkbUseCorePtr) {
6932 ((stuff->deviceSpec == XkbUseCoreKbd && other->key) ||
6933 (stuff->deviceSpec == XkbUseCorePtr && other->button))) {
6937 rc = _XkbSetDeviceInfo(client, other, stuff);
6964 newFlags = xkbDebugFlags & (~stuff->affectFlags);
6965 newFlags |= (stuff->flags & stuff->affectFlags);
6966 newCtrls = xkbDebugCtrls & (~stuff->affectCtrls);
6967 newCtrls |= (stuff->ctrls & stuff->affectCtrls);
6968 if (xkbDebugFlags || newFlags || stuff->msgLength) {
6975 extraLength = (stuff->length << 2) - sz_xkbSetDebuggingFlagsReq;
6976 if (stuff->msgLength > 0) {
6979 if (extraLength < XkbPaddedSize(stuff->msgLength)) {
6982 stuff->msgLength, (long) extraLength,
6983 XkbPaddedSize(stuff->msgLength));
6986 msg = (char *) &stuff[1];
6987 if (msg[stuff->msgLength - 1] != '\0') {
7022 switch (stuff->data) {