]> Dogcows Code - chaz/openbox/commitdiff
don't accept non-letter keys for shortcuts, they can't be shortcuts anyways and it...
authorDana Jansens <danakj@orodu.net>
Wed, 2 May 2007 00:02:02 +0000 (00:02 +0000)
committerDana Jansens <danakj@orodu.net>
Wed, 2 May 2007 00:02:02 +0000 (00:02 +0000)
openbox/event.c

index 78768a62235d3a5eb1fb882781a5545968e58a20..5d6b62bb0eb82ef6d6192910ca7f90be9b2fbca1 100644 (file)
@@ -1249,6 +1249,9 @@ static void event_handle_menu_shortcut(XEvent *ev)
         const char *key;
         if ((key = translate_keycode(ev->xkey.keycode)) == NULL)
             return;
+        /* don't accept keys that aren't a single letter, like "space" */
+        if (key[1] != '\0')
+            return;
         unikey = g_utf8_get_char_validated(key, -1);
         if (unikey == (gunichar)-1 || unikey == (gunichar)-2 || unikey == 0)
             return;
This page took 0.02738 seconds and 4 git commands to generate.