equal
deleted
inserted
replaced
347 /* this causes an error if some other window manager is running */ |
347 /* this causes an error if some other window manager is running */ |
348 XSelectInput(dpy, DefaultRootWindow(dpy), SubstructureRedirectMask); |
348 XSelectInput(dpy, DefaultRootWindow(dpy), SubstructureRedirectMask); |
349 XSync(dpy, False); |
349 XSync(dpy, False); |
350 if(otherwm) |
350 if(otherwm) |
351 eprint("dwm: another window manager is already running\n"); |
351 eprint("dwm: another window manager is already running\n"); |
352 XSync(dpy, False); |
|
353 XSetErrorHandler(NULL); |
352 XSetErrorHandler(NULL); |
354 xerrorxlib = XSetErrorHandler(xerror); |
353 xerrorxlib = XSetErrorHandler(xerror); |
355 XSync(dpy, False); |
354 XSync(dpy, False); |
356 } |
355 } |
357 |
356 |
873 |
872 |
874 ev = &e->xkey; |
873 ev = &e->xkey; |
875 keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0); |
874 keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0); |
876 for(i = 0; i < LENGTH(keys); i++) |
875 for(i = 0; i < LENGTH(keys); i++) |
877 if(keysym == keys[i].keysym |
876 if(keysym == keys[i].keysym |
878 && CLEANMASK(keys[i].mod) == CLEANMASK(ev->state)) |
877 && CLEANMASK(keys[i].mod) == CLEANMASK(ev->state) |
879 { |
878 && keys[i].func) |
880 if(keys[i].func) |
879 keys[i].func(keys[i].arg); |
881 keys[i].func(keys[i].arg); |
|
882 } |
|
883 } |
880 } |
884 |
881 |
885 void |
882 void |
886 killclient(const void *arg) { |
883 killclient(const void *arg) { |
887 XEvent ev; |
884 XEvent ev; |