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) bind->mods != current->mods)
continue; continue;
context->has_errors = true; context->has_errors = true;
fprintf(stderr, "Duplicated keybinding in config file: mod%d with key %s", current->mods, current->symbol); if (current->keycode != 0) {
/* if keycode is 0, this is a keysym binding */ ELOG("Duplicate keybinding in config file:\n modmask %d with keycode %d, command \"%s\"\n",
if (current->keycode != 0) current->mods, current->keycode, current->command);
fprintf(stderr, " and keycode %d", current->keycode); } else {
fprintf(stderr, "\n"); ELOG("Duplicate keybinding in config file:\n modmask %d with keysym %s, command \"%s\"\n",
current->mods, current->symbol, current->command);
}
} }
} }
} }