From 753e0e048e13fe7cbace7c07917d26081a483eba Mon Sep 17 00:00:00 2001 From: Anselm R Garbe Date: Tue, 2 Sep 2008 18:47:01 +0100 Subject: applied Gottox' grabkey patch --- dwm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'dwm.c') diff --git a/dwm.c b/dwm.c index 12871cd..bdef755 100644 --- a/dwm.c +++ b/dwm.c @@ -763,10 +763,10 @@ grabkeys(void) { XUngrabKey(dpy, AnyKey, AnyModifier, root); for(i = 0; i < LENGTH(keys); i++) { - code = XKeysymToKeycode(dpy, keys[i].keysym); - for(j = 0; j < LENGTH(modifiers); j++) - XGrabKey(dpy, code, keys[i].mod | modifiers[j], root, True, - GrabModeAsync, GrabModeAsync); + if((code = XKeysymToKeycode(dpy, keys[i].keysym))) + for(j = 0; j < LENGTH(modifiers); j++) + XGrabKey(dpy, code, keys[i].mod | modifiers[j], root, + True, GrabModeAsync, GrabModeAsync); } } } -- cgit v1.2.3-13-gbd6f