xkb: ignore floating slave devices when updating from master (#81885)
Introduced in 45fb3a934d
. When a device is
enabled, the master's locked state is pushed to the slave. If the device is
floating, no master exists and we triggered a NULL-pointer dereference
in XkbPushLockedStateToSlaves.
X.Org Bug 81885 <http://bugs.freedesktop.org/show_bug.cgi?id=81885>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
4599a4492c
commit
1e30fc1b99
|
@ -416,7 +416,7 @@ EnableDevice(DeviceIntPtr dev, BOOL sendevent)
|
||||||
XISendDeviceHierarchyEvent(flags);
|
XISendDeviceHierarchyEvent(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IsMaster(dev))
|
if (!IsMaster(dev) && !IsFloating(dev))
|
||||||
XkbPushLockedStateToSlaves(GetMaster(dev, MASTER_KEYBOARD), 0, 0);
|
XkbPushLockedStateToSlaves(GetMaster(dev, MASTER_KEYBOARD), 0, 0);
|
||||||
RecalculateMasterButtons(dev);
|
RecalculateMasterButtons(dev);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue