[PATCH] XkbSetNamedIndicator should ignore SD's without LED's
Peter Hutterer
peter.hutterer at who-t.net
Sun May 3 03:46:04 PDT 2009
On Sat, May 02, 2009 at 12:34:02AM -0700, Alan Coopersmith wrote:
> 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 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 at sun.com>
> ---
> xkb/xkb.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/xkb/xkb.c b/xkb/xkb.c
> index e7c9a31..7673411 100644
> --- a/xkb/xkb.c
> +++ b/xkb/xkb.c
> @@ -3433,6 +3433,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 ) &&
Please remove the spaces before/after the parens before pushing to be
consistent with the surrounding code.
> (XaceHook(XACE_DEVICE_ACCESS, client, other, DixSetAttrAccess) == Success))
> {
> rc = _XkbCreateIndicatorMap(other, stuff->indicator,
> @@ -3456,6 +3457,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 ) &&
same here.
> (XaceHook(XACE_DEVICE_ACCESS, client, other, DixSetAttrAccess) == Success))
> {
> _XkbSetNamedIndicator(client, other, stuff);
> --
> 1.5.6.5
Acked-by: Peter Hutterer <peter.hutterer at who-t.net>
More information about the xorg-devel
mailing list