From: Anselm R Garbe Date: Mon, 26 May 2008 10:42:02 +0000 (+0100) Subject: slight changes X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=64243ab05b1eb6edfd2ede98a318de7379b7dc2e;p=dwm.git slight changes --- diff --git a/dwm.c b/dwm.c index 235365b..12ad997 100644 --- a/dwm.c +++ b/dwm.c @@ -349,7 +349,6 @@ checkotherwm(void) { XSync(dpy, False); if(otherwm) eprint("dwm: another window manager is already running\n"); - XSync(dpy, False); XSetErrorHandler(NULL); xerrorxlib = XSetErrorHandler(xerror); XSync(dpy, False); @@ -875,11 +874,9 @@ keypress(XEvent *e) { keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0); for(i = 0; i < LENGTH(keys); i++) if(keysym == keys[i].keysym - && CLEANMASK(keys[i].mod) == CLEANMASK(ev->state)) - { - if(keys[i].func) - keys[i].func(keys[i].arg); - } + && CLEANMASK(keys[i].mod) == CLEANMASK(ev->state) + && keys[i].func) + keys[i].func(keys[i].arg); } void