Browse Source

applied Martin Hurton's checkotherwm simplification

main
Anselm R Garbe 16 years ago
parent
commit
9a4d07d9de
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      dwm.c

+ 3
- 4
dwm.c View File

@ -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);
xerrorxlib = XSetErrorHandler(xerror);
XSetErrorHandler(xerror);
XSync(dpy, False); XSync(dpy, False);
} }
@ -1625,7 +1624,7 @@ updatesizehints(Client *c) {
else else
c->maxa = c->mina = 0.0; c->maxa = c->mina = 0.0;
c->isfixed = (c->maxw && c->minw && c->maxh && c->minh c->isfixed = (c->maxw && c->minw && c->maxh && c->minh
&& c->maxw == c->minw && c->maxh == c->minh);
&& c->maxw == c->minw && c->maxh == c->minh);
} }
void void


Loading…
Cancel
Save