]> Dogcows Code - chaz/openbox/blobdiff - obt/keyboard.c
have obt refresh the xlib keyboard stuff on mappingnotify events
[chaz/openbox] / obt / keyboard.c
index 5e2184298b48c1b5dbcb16808528c090e691ebd9..f7a0f3bbee80cd83a3c12c336c33b824940fd006 100644 (file)
@@ -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;
@@ -331,6 +340,9 @@ gunichar obt_keyboard_keypress_to_unichar(ObtIC *ic, XEvent *ev)
                 got_string = TRUE;
             }
         }
+        else if (status == XLookupKeySym)
+            /* this key doesn't have a text representation, it is a command
+               key of some sort */;
         else
             g_message("Bad keycode lookup. Keysym 0x%x Status: %s\n",
                       (guint) sym,
@@ -372,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,
This page took 0.025188 seconds and 4 git commands to generate.