config: only free odev->attrib_name for string types

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
xfree86: handle xorg.conf devices with logind

Only devices from the config backend have their attributes set, devices from
the xorg.conf only have Option "Device". That option is also set by the
config backend, so use it.

And since the config backend sets our major/minor but xorg.conf devices don't
have that set, make sure we try to stat it first where needed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
xkb: factor out the StateNotify flag check

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
xkb: factor out state update into a function

No functional changes

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
xkb: push locked modifier state down to attached slave devices

Whenever the master changes, push the locked modifier state to the attached
slave devices, then update the indicators. This way, when NumLock or CapsLock
are hit on any device, the LED will light up on all devices. Likewise, a new
keyboard attached to a master device will light up with the correct
indicators.

The indicators are handled per-keyboard, depending on the layout, i.e. if one
keyboard has grp_led:num set, the NumLock LED won't light up on that keyboard.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
config: search for PnPID on all parents (#75513)

The PnPID for a device may not be on the immediate parent, so search up the
device tree until we find one.

X.Org Bug 75513 <http://bugs.freedesktop.org/show_bug.cgi?id=75513>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Merge remote-tracking branch 'whot/for-keith'