summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-01-15 12:31:42 +0100
committerDaniel Friesel <derf@finalrewind.org>2011-01-15 12:31:42 +0100
commit972821998aea7b0ff47fba3e41e1bb17819c79d2 (patch)
treee9e9b805fb8e5484aa9841aaf3d01478be2a97ca /src
parent5cc2c324e269756464275741c35033d972cc645a (diff)
feh/keys: Further error handling (invalid keysyms etc.)
Diffstat (limited to 'src')
-rw-r--r--src/keyevents.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/keyevents.c b/src/keyevents.c
index f3a6624..e58c44b 100644
--- a/src/keyevents.c
+++ b/src/keyevents.c
@@ -73,7 +73,7 @@ static void feh_set_parse_kb_partial(fehkey *key, int index, char *ks) {
mod = Mod5Mask;
break;
default:
- weprintf("feh keys: invalid modifier %c in %s", ks[0], ks);
+ weprintf("keys: invalid modifier %c in %s", ks[0], ks);
break;
}
cur = ks + 2;
@@ -81,6 +81,9 @@ static void feh_set_parse_kb_partial(fehkey *key, int index, char *ks) {
key->keysyms[index] = XStringToKeysym(cur);
key->keystates[index] = mod;
+
+ if (key->keysyms[index] == NoSymbol)
+ weprintf("keys: Invalid keysym: %s", cur);
}
void init_keyevents(void) {
@@ -280,7 +283,7 @@ void init_keyevents(void) {
else if (!strcmp(action, "reload_plus"))
cur_kb = &keys.reload_plus;
else
- weprintf("feh keys: Invalid action: %s", action);
+ weprintf("keys: Invalid action: %s", action);
if (cur_kb) {
feh_set_parse_kb_partial(cur_kb, 0, k1);