GTK: Fix reading of direct modifiers from config.

This commit is contained in:
Brandon Wright 2019-02-09 10:16:27 -06:00
parent dd4614dada
commit f65b876382
1 changed files with 7 additions and 3 deletions

View File

@ -172,17 +172,21 @@ Binding::Binding (const char *raw_string)
bool ctrl = false;
bool shift = false;
bool alt= false;
bool direct = false;
unsigned int keyval = 0;
char *key;
if (!strchr (substr, '+'))
direct = true;
key = strtok (substr, "+");
while (key)
{
if (strstr (key, "Alt"))
if (strstr (key, "Alt") && !direct)
alt = true;
else if (strstr (key, "Ctrl"))
else if (strstr (key, "Ctrl") && !direct)
ctrl = true;
else if (strstr (key, "Shift"))
else if (strstr (key, "Shift") && !direct)
shift = true;
else
{