applied Martin Hurton's checkotherwm simplification
This commit is contained in:
parent
30410108eb
commit
9a4d07d9de
5
dwm.c
5
dwm.c
|
@ -337,15 +337,14 @@ buttonpress(XEvent *e) {
|
||||||
void
|
void
|
||||||
checkotherwm(void) {
|
checkotherwm(void) {
|
||||||
otherwm = False;
|
otherwm = False;
|
||||||
XSetErrorHandler(xerrorstart);
|
xerrorxlib = XSetErrorHandler(xerrorstart);
|
||||||
|
|
||||||
/* this causes an error if some other window manager is running */
|
/* this causes an error if some other window manager is running */
|
||||||
XSelectInput(dpy, DefaultRootWindow(dpy), SubstructureRedirectMask);
|
XSelectInput(dpy, DefaultRootWindow(dpy), SubstructureRedirectMask);
|
||||||
XSync(dpy, False);
|
XSync(dpy, False);
|
||||||
if(otherwm)
|
if(otherwm)
|
||||||
die("dwm: another window manager is already running\n");
|
die("dwm: another window manager is already running\n");
|
||||||
XSetErrorHandler(NULL);
|
XSetErrorHandler(xerror);
|
||||||
xerrorxlib = XSetErrorHandler(xerror);
|
|
||||||
XSync(dpy, False);
|
XSync(dpy, False);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue