summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2006-09-07 15:17:04 +0300
committerDaniel Stone <daniels@endtroducing.fooishbar.org>2006-09-07 15:17:04 +0300
commit629798c73ad76a77fa6a55bc6403fd9b95ade2bb (patch)
tree428f0288aef2582a415c71e0432cb12cedd7f02e /xkb
parent4524a2bf6f22c871ed109b027a065f0262137dc5 (diff)
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.
Diffstat (limited to 'xkb')
-rw-r--r--xkb/XKBAlloc.c5
-rw-r--r--xkb/xkbUtils.c11
2 files changed, 13 insertions, 3 deletions
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;