]> Dogcows Code - chaz/openbox/blobdiff - obt/keyboard.c
Merge branch 'backport' into work
[chaz/openbox] / obt / keyboard.c
index 397504fb6b4af493af2425012804b407f19715c2..710a94c23b33ccad97af9421f514214a71b474e8 100644 (file)
@@ -197,21 +197,20 @@ KeyCode obt_keyboard_keysym_to_keycode(KeySym sym)
     return 0;
 }
 
-const gchar *obt_keyboard_keycode_to_string(guint keycode)
+gchar *obt_keyboard_keycode_to_string(guint keycode)
 {
     KeySym sym;
-    const gchar *ret = NULL;
 
     if ((sym = XKeycodeToKeysym(obt_display, keycode, 0)) != NoSymbol)
-        ret = XKeysymToString(sym);
-    return g_locale_to_utf8(ret, -1, NULL, NULL, NULL);
+        return g_locale_to_utf8(XKeysymToString(sym), -1, NULL, NULL, NULL);
+    return NULL;
 }
 
 gunichar obt_keyboard_keycode_to_unichar(guint keycode)
 {
     gunichar unikey = 0;
+    char *key;
 
-    const char *key;
     if ((key = obt_keyboard_keycode_to_string(keycode)) != NULL &&
         /* don't accept keys that aren't a single letter, like "space" */
         key[1] == '\0')
This page took 0.02181 seconds and 4 git commands to generate.