]> Dogcows Code - chaz/openbox/blobdiff - openbox/translate.c
make the dock's hiding always have at least 1px on screen
[chaz/openbox] / openbox / translate.c
index e7962ad575561b2f89e3e8d7e72e94b643eb1e9f..b2ae7d677eca6a619df161bba1eca8b7d2a10ea5 100644 (file)
@@ -111,6 +111,8 @@ gboolean translate_key(const gchar *str, guint *state, guint *keycode)
 
     parsed = g_strsplit(str, "-", -1);
 
+    *state = *keycode = 0;
+
     /* first, find the key (last token) */
     l = NULL;
     for (i = 0; parsed[i] != NULL; ++i)
@@ -156,7 +158,7 @@ translation_fail:
     return ret;
 }
 
-const gchar *translate_keycode(guint keycode)
+gchar *translate_keycode(guint keycode)
 {
     KeySym sym;
     const gchar *ret = NULL;
@@ -170,7 +172,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')
This page took 0.026059 seconds and 4 git commands to generate.