move validation of pointer Button into conf_mousebind so we check

validity during the parse phase and not bother adding it to the queue,
instead of each time a client needs to grab (when it's too late);
furthermore, make this a config error, stop parsing and load the
default config.
This commit is contained in:
okan
2013-05-22 16:32:15 +00:00
parent 866f5af9c7
commit 532f132194
3 changed files with 29 additions and 24 deletions

View File

@@ -171,7 +171,12 @@ main : FONTNAME STRING {
conf->gap.right = $5;
}
| MOUSEBIND STRING string {
conf_mousebind(conf, $2, $3);
if (!conf_mousebind(conf, $2, $3)) {
yyerror("invalid mousebind: %s %s", $2, $3);
free($2);
free($3);
YYERROR;
}
free($2);
free($3);
}