Xi: don't list attachment in ListInputDevices, but list all SDs.
In XI2, we only list the VCP and the VCK as well as floating SDs to non-XI2 clients. This is not the case here, we just list all devices. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
This commit is contained in:
parent
1d307ed7f2
commit
7330cb5650
34
Xi/listdev.c
34
Xi/listdev.c
|
@ -187,10 +187,6 @@ CopySwapDevice(ClientPtr client, DeviceIntPtr d, int num_classes,
|
|||
dev->use = IsXExtensionPointer;
|
||||
else
|
||||
dev->use = IsXExtensionDevice;
|
||||
if (!d->isMaster)
|
||||
dev->attached = (d->u.master) ? d->u.master->id : IsFloating;
|
||||
else
|
||||
dev->attached = GetPairedDevice(d)->id;
|
||||
|
||||
if (client->swapped) {
|
||||
swapl(&dev->type, n); /* macro - braces are required */
|
||||
|
@ -348,16 +344,6 @@ ProcXListInputDevices(ClientPtr client)
|
|||
AddOtherInputDevices();
|
||||
|
||||
for (d = inputInfo.devices; d; d = d->next) {
|
||||
if (pXIClient->major_version < XI_2_Major)
|
||||
{
|
||||
if (d->isMaster &&
|
||||
d != inputInfo.pointer &&
|
||||
d != inputInfo.keyboard)
|
||||
continue; /* don't send master devices other than VCP/VCK */
|
||||
|
||||
if (!d->isMaster && d->u.master)
|
||||
continue; /* don't send attached SDs */
|
||||
}
|
||||
rc = XaceHook(XACE_DEVICE_ACCESS, client, d, DixGetAttrAccess);
|
||||
if (rc != Success)
|
||||
return rc;
|
||||
|
@ -366,11 +352,6 @@ ProcXListInputDevices(ClientPtr client)
|
|||
}
|
||||
|
||||
for (d = inputInfo.off_devices; d; d = d->next) {
|
||||
if (pXIClient->major_version < XI_2_Major &&
|
||||
!d->isMaster &&
|
||||
d->u.master) /* XXX can off_devices be attached? */
|
||||
continue; /* don't send attached SDs */
|
||||
|
||||
rc = XaceHook(XACE_DEVICE_ACCESS, client, d, DixGetAttrAccess);
|
||||
if (rc != Success)
|
||||
return rc;
|
||||
|
@ -387,26 +368,11 @@ ProcXListInputDevices(ClientPtr client)
|
|||
dev = (xDeviceInfoPtr) devbuf;
|
||||
for (d = inputInfo.devices; d; d = d->next)
|
||||
{
|
||||
if (pXIClient->major_version < XI_2_Major)
|
||||
{
|
||||
if (d->isMaster &&
|
||||
d != inputInfo.pointer &&
|
||||
d != inputInfo.keyboard)
|
||||
continue; /* don't count master devices other than VCP/VCK */
|
||||
|
||||
if (!d->isMaster && d->u.master)
|
||||
continue; /* don't count attached SDs */
|
||||
}
|
||||
ListDeviceInfo(client, d, dev++, &devbuf, &classbuf, &namebuf);
|
||||
}
|
||||
|
||||
for (d = inputInfo.off_devices; d; d = d->next)
|
||||
{
|
||||
if (pXIClient->major_version < XI_2_Major &&
|
||||
!d->isMaster &&
|
||||
d->u.master) /* XXX can off_devices be attached? */
|
||||
continue; /* don't send attached SDs */
|
||||
|
||||
ListDeviceInfo(client, d, dev++, &devbuf, &classbuf, &namebuf);
|
||||
}
|
||||
rep.ndevices = numdevs;
|
||||
|
|
Loading…
Reference in New Issue
Block a user