diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2014-02-26 16:20:08 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2014-03-11 17:43:34 +1000 |
commit | 45fb3a934dc0db51584aba37c2f9d73deff9191d (patch) | |
tree | 4f79790f2247c7ec67dedb864322e40c497416c6 /dix | |
parent | 656841798c99bcd79da47c03ec666a48b855541f (diff) |
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>
Diffstat (limited to 'dix')
-rw-r--r-- | dix/devices.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/dix/devices.c b/dix/devices.c index 1c86d5242..ab923d574 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -416,6 +416,8 @@ EnableDevice(DeviceIntPtr dev, BOOL sendevent) XISendDeviceHierarchyEvent(flags); } + if (!IsMaster(dev)) + XkbPushLockedStateToSlaves(GetMaster(dev, MASTER_KEYBOARD), 0, 0); RecalculateMasterButtons(dev); /* initialise an idle timer for this device*/ @@ -2649,6 +2651,7 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) dev->spriteInfo->paired = master; dev->spriteInfo->spriteOwner = FALSE; + XkbPushLockedStateToSlaves(GetMaster(dev, MASTER_KEYBOARD), 0, 0); RecalculateMasterButtons(master); } |