X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Ftranslate.c;h=210155789927eae576028c6e8af45d421eaa178f;hb=2b80e4e8ef56bb4fba614139601e750344418e5b;hp=5b2b4ebee056ff60d3ffd6580dfa74a7d4db5303;hpb=77baf26a7f2f64ddf1274035fd4991ab17345904;p=chaz%2Fopenbox diff --git a/openbox/translate.c b/openbox/translate.c index 5b2b4ebe..21015578 100644 --- a/openbox/translate.c +++ b/openbox/translate.c @@ -156,7 +156,7 @@ translation_fail: return ret; } -const gchar *translate_keycode(guint keycode) +gchar *translate_keycode(guint keycode) { KeySym sym; const gchar *ret = NULL; @@ -170,7 +170,7 @@ gunichar translate_unichar(guint keycode) { gunichar unikey = 0; - const char *key; + char *key; if ((key = translate_keycode(keycode)) != NULL && /* don't accept keys that aren't a single letter, like "space" */ key[1] == '\0') @@ -179,5 +179,6 @@ gunichar translate_unichar(guint keycode) if (unikey == (gunichar)-1 || unikey == (gunichar)-2 || unikey == 0) unikey = 0; } + g_free(key); return unikey; }