diff --git a/xkb/XKBAlloc.c b/xkb/XKBAlloc.c index 8356e47e7..c474733d0 100644 --- a/xkb/XKBAlloc.c +++ b/xkb/XKBAlloc.c @@ -324,8 +324,11 @@ XkbFreeKeyboard(XkbDescPtr xkb,unsigned which,Bool freeAll) XkbFreeIndicatorMaps(xkb); if (which&XkbNamesMask) XkbFreeNames(xkb,XkbAllNamesMask,True); - if ((which&XkbGeometryMask) && (xkb->geom!=NULL)) + if ((which&XkbGeometryMask) && (xkb->geom!=NULL)) { XkbFreeGeometry(xkb->geom,XkbGeomAllMask,True); + /* PERHAPS BONGHITS etc */ + xkb->geom = NULL; + } if (which&XkbControlsMask) XkbFreeControls(xkb,XkbAllControlsMask,True); if (freeAll) diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c index 813801df3..0fde727ea 100644 --- a/xkb/xkbUtils.c +++ b/xkb/xkbUtils.c @@ -1476,6 +1476,8 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) } /* geometry */ + /* not implemented yet because oh god the pain. */ +#if 0 if (src->geom) { /* properties */ /* colors */ @@ -1485,9 +1487,13 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) /* key aliases */ /* font?!? */ } - else { + else +#endif + { if (dst->geom) { + /* I LOVE THE DIFFERENT CALL SIGNATURE. REALLY, I DO. */ XkbFreeGeometry(dst->geom, XkbGeomAllMask, True); + dst->geom = NULL; } } @@ -1520,7 +1526,8 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) } else { /* send NewKeyboardNotify if the keycode range changed, else - * just MapNotify. */ + * just MapNotify. we also need to send NKN if the geometry + * changed (obviously ...). */ if ((src->min_key_code != dst->min_key_code || src->max_key_code != dst->max_key_code) && sendNotifies) { nkn.oldMinKeyCode = dst->min_key_code;