diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-09-03 11:30:48 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-09-04 13:12:43 +1000 |
commit | 8af2793a90e8e644a6a598adce3f752c15b3e37a (patch) | |
tree | 612f424162d1e0df5ce35999a0a423c9eca7fea1 /xkb/xkb.c | |
parent | 219ae5b628f9ffe2be0876d5911cc04e52bef5f8 (diff) |
xkb: xkbGetKbdByName on the lastSlave needs to change the master (#21859)
If the layout is changed on a master's lastSlave, the master needs to change
layout immediately. Otherwise, the master stays on the same layout until the
lastSlave changes - which may not happen if only a single keyboard is
available.
X.Org Bug 21859 <http://bugs.freedesktop.org/show_bug.cgi?id=21859>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'xkb/xkb.c')
-rw-r--r-- | xkb/xkb.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -5867,6 +5867,16 @@ ProcXkbGetKbdByName(ClientPtr client) if (geom_changed) nkn.changed|= XkbNKN_GeometryMask; XkbSendNewKeyboardNotify(dev,&nkn); + + if (!IsMaster(dev) && dev->u.master) + { + DeviceIntPtr master = dev->u.master; + if (master->u.lastSlave == dev) + { + XkbCopyDeviceKeymap(dev->u.master, dev); + XkbSendNewKeyboardNotify(dev,&nkn); + } + } } if ((new!=NULL)&&(new!=xkb)) { XkbFreeKeyboard(new,XkbAllComponentsMask,True); |