diff options
| author | Dana Jansens <danakj@orodu.net> | 2010-02-12 08:11:27 -0500 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2010-02-12 09:37:46 -0500 |
| commit | 7c2eb3a781b4434d243b3d135e3dc1ce288cf464 (patch) | |
| tree | ae1660f21f18b8be0dffa4b8a597d8aa5699e100 /obt/keyboard.c | |
| parent | aa5394cad2dc0bac46631e29005cbc7b99d03330 (diff) | |
destroy XIC's that belong to an XIM before closing the XIM, else Xlib will seggie!
Diffstat (limited to 'obt/keyboard.c')
| -rw-r--r-- | obt/keyboard.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/obt/keyboard.c b/obt/keyboard.c index 57208aa2..f7a0f3bb 100644 --- a/obt/keyboard.c +++ b/obt/keyboard.c @@ -116,10 +116,19 @@ void obt_keyboard_reload(void) 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 @@ KeySym obt_keyboard_keypress_to_keysym(XEvent *ev) 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, |
