[PATCH 18/20] xkb: Fix a check for MASTER_KEYBOARD

Peter Hutterer peter.hutterer at who-t.net
Thu Feb 17 19:52:25 PST 2011


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 xkb/xkb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xkb/xkb.c b/xkb/xkb.c
index 43d847a..169c604 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -5831,6 +5831,7 @@ ProcXkbGetKbdByName(ClientPtr client)
     if (reported&XkbGBN_GeometryMask)
 	XkbSendGeometry(client,new->geom,&grep,FALSE);
     if (rep.loaded) {
+	DeviceIntPtr		master;
 	XkbDescPtr		old_xkb;
 	xkbNewKeyboardNotify 	nkn;
 	int 			i,nG,nTG;
@@ -5883,9 +5884,8 @@ ProcXkbGetKbdByName(ClientPtr client)
 	    nkn.changed|= XkbNKN_GeometryMask;
 	XkbSendNewKeyboardNotify(dev,&nkn);
 
-	if (!IsMaster(dev) && !IsFloating(dev))
+	if (!IsMaster(dev) && (master = GetMaster(dev, MASTER_KEYBOARD)))
 	{
-	    DeviceIntPtr master = dev->u.master;
 	    if (master->u.lastSlave == dev)
 	    {
 		XkbCopyDeviceKeymap(dev->u.master, dev);
-- 
1.7.4



More information about the xorg-devel mailing list