Commit 72b6639c authored by Daniel Stone's avatar Daniel Stone Committed by Peter Hutterer

XKB: Don't send unnecessary NewKeyboardNotifies

In the XKB GetKeyboardByName handler, we had the following pseudocode:
    if (device was last slave of its MD) {
        XkbCopyDeviceKeymap(master, slave);
        XkbSendNewKeyboardNotify(slave, &notify);

Even if the SendNewKeyboardNotify line nominated the correct device,
which it didn't, it's unnecessary as XkbCopyDeviceKeymap already sends a
NewKeyboardNotify on the destination device.
Signed-off-by: 's avatarDaniel Stone <>
Reviewed-by: 's avatarPeter Hutterer <>
parent 70cef8d8
......@@ -5902,10 +5902,8 @@ ProcXkbGetKbdByName(ClientPtr client)
if (!IsMaster(dev)) {
DeviceIntPtr master = GetMaster(dev, MASTER_KEYBOARD);
if (master && master->lastSlave == dev) {
if (master && master->lastSlave == dev)
XkbCopyDeviceKeymap(master, dev);
if ((new!=NULL)&&(new!=xkb)) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment