summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
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);
}
}