diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-02-18 12:06:56 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-02-22 14:35:45 +1000 |
commit | 2936635698619271a790004480a14285149277cb (patch) | |
tree | 097db7077797ca03063e9e10135fdf4c82934fbd /xkb/xkb.c | |
parent | 0ba526deeb4d54ee1a75400291ee7a3673ed4d96 (diff) |
xkb: Fix a check for MASTER_KEYBOARD
And copy into the master keyboard, not just the directly attached device.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
Diffstat (limited to 'xkb/xkb.c')
-rw-r--r-- | xkb/xkb.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -5883,12 +5883,10 @@ ProcXkbGetKbdByName(ClientPtr client) nkn.changed|= XkbNKN_GeometryMask; XkbSendNewKeyboardNotify(dev,&nkn); - if (!IsMaster(dev) && !IsFloating(dev)) - { - DeviceIntPtr master = dev->u.master; - if (master->u.lastSlave == dev) - { - XkbCopyDeviceKeymap(dev->u.master, dev); + if (!IsMaster(dev)) { + DeviceIntPtr master = GetMaster(dev, MASTER_KEYBOARD); + if (master && master->u.lastSlave == dev) { + XkbCopyDeviceKeymap(master, dev); XkbSendNewKeyboardNotify(dev,&nkn); } } |