summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-02-18 12:06:56 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-02-22 14:35:45 +1000
commit2936635698619271a790004480a14285149277cb (patch)
tree097db7077797ca03063e9e10135fdf4c82934fbd /xkb
parent0ba526deeb4d54ee1a75400291ee7a3673ed4d96 (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')
-rw-r--r--xkb/xkb.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/xkb/xkb.c b/xkb/xkb.c
index 4557350bf..22417533e 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -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);
}
}