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: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Daniel Stone 2011-05-03 02:39:55 +01:00 committed by Peter Hutterer
parent 70cef8d8ba
commit 72b6639c83

View File

@ -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);
XkbSendNewKeyboardNotify(dev,&nkn);
}
}
}
if ((new!=NULL)&&(new!=xkb)) {