Bugfix: use ELOG to actually get the error message into the logfile shown by i3-nagbar

This commit is contained in:
Michael Stapelberg 2011-08-04 21:43:55 +02:00
parent 4e350664ae
commit ecc2cae3f7
1 changed files with 7 additions and 5 deletions

View File

@ -346,11 +346,13 @@ static void check_for_duplicate_bindings(struct context *context) {
bind->mods != current->mods)
continue;
context->has_errors = true;
fprintf(stderr, "Duplicated keybinding in config file: mod%d with key %s", current->mods, current->symbol);
/* if keycode is 0, this is a keysym binding */
if (current->keycode != 0)
fprintf(stderr, " and keycode %d", current->keycode);
fprintf(stderr, "\n");
if (current->keycode != 0) {
ELOG("Duplicate keybinding in config file:\n modmask %d with keycode %d, command \"%s\"\n",
current->mods, current->keycode, current->command);
} else {
ELOG("Duplicate keybinding in config file:\n modmask %d with keysym %s, command \"%s\"\n",
current->mods, current->symbol, current->command);
}
}
}
}