mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-21 13:20:04 +01:00
XkbSetNamedIndicator should ignore SD's without LED's
When ProcXkbSetNamedIndicator is called on a core device, and we
walk the slaves to set the LED's on each of them, ignore any slaves
that do not have either a KbdFeedbackCtrl or LedCtrl structure.
(This is much more critical in xserver-1.5-branch, where we walk
*all* devices, not just the slaves of the specified master, and
thus return failure when setting an LED on the Core Keyboard and
hit a xf86-input-mouse device with no LED's to set.)
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 557dbadf3b)
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
01f0210b2b
commit
3153630770
1 changed files with 2 additions and 0 deletions
|
|
@ -3438,6 +3438,7 @@ ProcXkbSetNamedIndicator(ClientPtr client)
|
||||||
for (other = inputInfo.devices; other; other = other->next)
|
for (other = inputInfo.devices; other; other = other->next)
|
||||||
{
|
{
|
||||||
if ((other != dev) && !other->isMaster && (other->u.master == dev) &&
|
if ((other != dev) && !other->isMaster && (other->u.master == dev) &&
|
||||||
|
(other->kbdfeed || other->leds) &&
|
||||||
(XaceHook(XACE_DEVICE_ACCESS, client, other, DixSetAttrAccess) == Success))
|
(XaceHook(XACE_DEVICE_ACCESS, client, other, DixSetAttrAccess) == Success))
|
||||||
{
|
{
|
||||||
rc = _XkbCreateIndicatorMap(other, stuff->indicator,
|
rc = _XkbCreateIndicatorMap(other, stuff->indicator,
|
||||||
|
|
@ -3461,6 +3462,7 @@ ProcXkbSetNamedIndicator(ClientPtr client)
|
||||||
for (other = inputInfo.devices; other; other = other->next)
|
for (other = inputInfo.devices; other; other = other->next)
|
||||||
{
|
{
|
||||||
if ((other != dev) && !other->isMaster && (other->u.master == dev) &&
|
if ((other != dev) && !other->isMaster && (other->u.master == dev) &&
|
||||||
|
(other->kbdfeed || other->leds) &&
|
||||||
(XaceHook(XACE_DEVICE_ACCESS, client, other, DixSetAttrAccess) == Success))
|
(XaceHook(XACE_DEVICE_ACCESS, client, other, DixSetAttrAccess) == Success))
|
||||||
{
|
{
|
||||||
_XkbSetNamedIndicator(client, other, stuff);
|
_XkbSetNamedIndicator(client, other, stuff);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue