Merge pull request #3590 from nejni-marji/next

Make binding modes case sensitive

closes #3587
This commit is contained in:
Ingo Bürk 2019-01-18 23:37:09 +01:00 committed by GitHub
commit 82a35a2418
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -621,7 +621,7 @@ void switch_mode(const char *new_mode) {
DLOG("Switching to mode %s\n", new_mode); DLOG("Switching to mode %s\n", new_mode);
SLIST_FOREACH(mode, &modes, modes) { SLIST_FOREACH(mode, &modes, modes) {
if (strcasecmp(mode->name, new_mode) != 0) if (strcmp(mode->name, new_mode) != 0)
continue; continue;
ungrab_all_keys(conn); ungrab_all_keys(conn);

View File

@ -122,7 +122,7 @@ CFGFUN(mode_binding, const char *bindtype, const char *modifiers, const char *ke
} }
CFGFUN(enter_mode, const char *pango_markup, const char *modename) { CFGFUN(enter_mode, const char *pango_markup, const char *modename) {
if (strcasecmp(modename, DEFAULT_BINDING_MODE) == 0) { if (strcmp(modename, DEFAULT_BINDING_MODE) == 0) {
ELOG("You cannot use the name %s for your mode\n", DEFAULT_BINDING_MODE); ELOG("You cannot use the name %s for your mode\n", DEFAULT_BINDING_MODE);
return; return;
} }