diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-02-23 08:44:42 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-02-23 08:44:42 +1000 |
commit | 579ee8f5d84c3a523b7b3e3941eabb226d1d19e2 (patch) | |
tree | a822eae1c534e6616aafad8e0139828c2d2b1fc1 /xkb/xkb.c | |
parent | b636893137da1695e235e3a9354bfd9243fdddc2 (diff) | |
parent | 17265ccb027e3f956bf7409106174f44621d1cb8 (diff) |
Merge branch 'mi-cleanup' into next
Diffstat (limited to 'xkb/xkb.c')
-rw-r--r-- | xkb/xkb.c | 26 |
1 files changed, 12 insertions, 14 deletions
@@ -3644,7 +3644,7 @@ register int n; swapl(&rep->indicators,n); } - start = desc = malloc(length); + start = desc = calloc(1, length); if ( !start ) return BadAlloc; if (xkb->names) { @@ -5569,13 +5569,13 @@ ProcXkbGetKbdByName(ClientPtr client) { DeviceIntPtr dev; DeviceIntPtr tmpd; - xkbGetKbdByNameReply rep; - xkbGetMapReply mrep; - xkbGetCompatMapReply crep; - xkbGetIndicatorMapReply irep; - xkbGetNamesReply nrep; - xkbGetGeometryReply grep; - XkbComponentNamesRec names; + xkbGetKbdByNameReply rep = {0}; + xkbGetMapReply mrep = {0}; + xkbGetCompatMapReply crep = {0}; + xkbGetIndicatorMapReply irep = {0}; + xkbGetNamesReply nrep = {0}; + xkbGetGeometryReply grep = {0}; + XkbComponentNamesRec names = {0}; XkbDescPtr xkb, new; unsigned char * str; char mapFile[PATH_MAX]; @@ -5883,12 +5883,10 @@ ProcXkbGetKbdByName(ClientPtr client) 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); + if (!IsMaster(dev)) { + DeviceIntPtr master = GetMaster(dev, MASTER_KEYBOARD); + if (master && master->lastSlave == dev) { + XkbCopyDeviceKeymap(master, dev); XkbSendNewKeyboardNotify(dev,&nkn); } } |