XkbCopyKeymap/SrvXkbCopyKeymap: free geom harder, add cheery comments
Unconditionally free geometry when copying the keymap (so we have none on core, oh well), add a couple of heartening comments.
This commit is contained in:
parent
4524a2bf6f
commit
629798c73a
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user