aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authorokan2013-05-22 16:32:15 +0000
committerokan2013-05-22 16:32:15 +0000
commit1ea4db26e9ce71da6e81886df5de1c593f85d0f7 (patch)
treec99eab22e1a4de376da48e943cf065249e510319 /parse.y
parent4d300eb9f8360589cdd8e04c639a3cb9c13eb15d (diff)
downloadcwm-1ea4db26e9ce71da6e81886df5de1c593f85d0f7.tar.gz
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.
Diffstat (limited to '')
-rw-r--r--parse.y9
1 files changed, 7 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index 4a41710..c21461c 100644
--- a/parse.y
+++ b/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.43 2013/05/22 13:02:14 okan Exp $ */
+/* $OpenBSD: parse.y,v 1.44 2013/05/22 16:32:15 okan Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -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);
}