about summary refs log tree commit diff
path: root/conf.c
diff options
context:
space:
mode:
authorokan <okan>2013-12-02 20:01:19 +0000
committerokan <okan>2013-12-02 20:01:19 +0000
commit873763f4c6a4369d703274a279296200bfd271a2 (patch)
treeb9e271a8395656cebd2de507b6abffda288d9ed6 /conf.c
parent3c78191e2ef0b51da1f70327cc9b7e087413f88d (diff)
parent5dc65d9242c423fd4f45ec48c32e525d9f1300f2 (diff)
downloadcwm-873763f4c6a4369d703274a279296200bfd271a2.tar.gz
cwm-873763f4c6a4369d703274a279296200bfd271a2.tar.xz
cwm-873763f4c6a4369d703274a279296200bfd271a2.zip
cvsimport
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/conf.c b/conf.c
index cd8f9d2..5eadfaf 100644
--- a/conf.c
+++ b/conf.c
@@ -103,6 +103,7 @@ conf_screen(struct screen_ctx *sc)
 	XftColor	 xc;
 
 	sc->gap = Conf.gap;
+	sc->snapdist = Conf.snapdist;
 
 	sc->xftfont = XftFontOpenXlfd(X_Dpy, sc->which, Conf.font);
 	if (sc->xftfont == NULL) {
@@ -479,17 +480,8 @@ conf_bind_kbd(struct conf *c, char *name, char *binding)
 	substring = conf_bind_getmask(name, &mask);
 	current_binding->modmask |= mask;
 
-	if (substring[0] == '[' &&
-	    substring[strlen(substring)-1] == ']') {
-		sscanf(substring, "[%d]", &current_binding->keycode);
-		current_binding->keysym = NoSymbol;
-	} else {
-		current_binding->keycode = 0;
-		current_binding->keysym = XStringToKeysym(substring);
-	}
-
-	if (current_binding->keysym == NoSymbol &&
-	    current_binding->keycode == 0) {
+	current_binding->keysym = XStringToKeysym(substring);
+	if (current_binding->keysym == NoSymbol) {
 		free(current_binding);
 		return;
 	}
@@ -530,9 +522,7 @@ conf_unbind_kbd(struct conf *c, struct keybinding *unbind)
 		if (key->modmask != unbind->modmask)
 			continue;
 
-		if ((key->keycode != 0 && key->keysym == NoSymbol &&
-		    key->keycode == unbind->keycode) ||
-		    key->keysym == unbind->keysym) {
+		if (key->keysym == unbind->keysym) {
 			TAILQ_REMOVE(&c->keybindingq, key, entry);
 			if (key->argtype & ARG_CHAR)
 				free(key->argument.c);