summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2009-05-02 00:26:18 -0700
committerKeith Packard <keithp@keithp.com>2009-05-08 22:47:11 -0700
commit31536307703fcffa14a027ec777310c9962f816c (patch)
tree0c78c596d6d510e9ed9b9cf5a7b980f376bc3afb
parent01f0210b2ba34f724aa221bbe6b567a5751781a6 (diff)
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 557dbadf3be273255e8fdb12d9321f4e88bf2b65) Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--xkb/xkb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xkb/xkb.c b/xkb/xkb.c
index 7c1edea1a..15a0f432c 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -3438,6 +3438,7 @@ ProcXkbSetNamedIndicator(ClientPtr client)
for (other = inputInfo.devices; other; other = other->next)
{
if ((other != dev) && !other->isMaster && (other->u.master == dev) &&
+ (other->kbdfeed || other->leds) &&
(XaceHook(XACE_DEVICE_ACCESS, client, other, DixSetAttrAccess) == Success))
{
rc = _XkbCreateIndicatorMap(other, stuff->indicator,
@@ -3461,6 +3462,7 @@ ProcXkbSetNamedIndicator(ClientPtr client)
for (other = inputInfo.devices; other; other = other->next)
{
if ((other != dev) && !other->isMaster && (other->u.master == dev) &&
+ (other->kbdfeed || other->leds) &&
(XaceHook(XACE_DEVICE_ACCESS, client, other, DixSetAttrAccess) == Success))
{
_XkbSetNamedIndicator(client, other, stuff);