From 72b6639c83df74767094a5e0c2861fdc5ea03ecd Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Tue, 3 May 2011 02:39:55 +0100 Subject: 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, ¬ify); } 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 Reviewed-by: Peter Hutterer --- xkb/xkb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'xkb') diff --git a/xkb/xkb.c b/xkb/xkb.c index 4044d333d..c4cb74015 100644 --- a/xkb/xkb.c +++ b/xkb/xkb.c @@ -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)) { -- cgit v1.2.3