all repos — openbox @ 7c2eb3a781b4434d243b3d135e3dc1ce288cf464

openbox fork - make it a bit more like ryudo

destroy XIC's that belong to an XIM before closing the XIM, else Xlib will seggie!
Dana Jansens danakj@orodu.net
commit

7c2eb3a781b4434d243b3d135e3dc1ce288cf464

parent

aa5394cad2dc0bac46631e29005cbc7b99d03330

1 files changed, 9 insertions(+), 5 deletions(-)

jump to
M obt/keyboard.cobt/keyboard.c

@@ -116,10 +116,19 @@ }

void obt_keyboard_shutdown(void) { + GSList *it; + XFreeModifiermap(modmap); modmap = NULL; XFree(keymap); keymap = NULL; + for (it = xic_all; it; it = g_slist_next(it)) { + ObtIC* ic = it->data; + if (ic->xic) { + XDestroyIC(ic->xic); + ic->xic = NULL; + } + } if (xim) XCloseIM(xim); xim = NULL; xim_style = 0;

@@ -375,11 +384,6 @@ }

void obt_keyboard_context_renew(ObtIC *ic) { - if (ic->xic) { - XDestroyIC(ic->xic); - ic->xic = NULL; - } - if (xim) { ic->xic = XCreateIC(xim, XNInputStyle, xim_style,