dix: SetModifierMapping should only apply to the ClientPointer and it's SDs.
This commit is contained in:
parent
e1b286d495
commit
2c3645581e
|
@ -1651,10 +1651,11 @@ DoSetModifierMapping(ClientPtr client, KeyCode *inputMap,
|
||||||
int numKeyPerModifier, xSetModifierMappingReply *rep)
|
int numKeyPerModifier, xSetModifierMappingReply *rep)
|
||||||
{
|
{
|
||||||
DeviceIntPtr pDev = NULL;
|
DeviceIntPtr pDev = NULL;
|
||||||
|
DeviceIntPtr cp = PickKeyboard(client); /* ClientPointer keyboard */
|
||||||
int rc, i = 0, inputMapLen = numKeyPerModifier * 8;
|
int rc, i = 0, inputMapLen = numKeyPerModifier * 8;
|
||||||
|
|
||||||
for (pDev = inputInfo.devices; pDev; pDev = pDev->next) {
|
for (pDev = inputInfo.devices; pDev; pDev = pDev->next) {
|
||||||
if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key) {
|
if (pDev == cp || (!pDev->isMaster && (pDev->u.master == cp) && pDev->key)) {
|
||||||
for (i = 0; i < inputMapLen; i++) {
|
for (i = 0; i < inputMapLen; i++) {
|
||||||
/* Check that all the new modifiers fall within the advertised
|
/* Check that all the new modifiers fall within the advertised
|
||||||
* keycode range, and are okay with the DDX. */
|
* keycode range, and are okay with the DDX. */
|
||||||
|
|
Loading…
Reference in New Issue