equal
deleted
inserted
replaced
335 } |
335 } |
336 |
336 |
337 void |
337 void |
338 checkotherwm(void) { |
338 checkotherwm(void) { |
339 otherwm = False; |
339 otherwm = False; |
340 XSetErrorHandler(xerrorstart); |
340 xerrorxlib = XSetErrorHandler(xerrorstart); |
341 |
341 |
342 /* this causes an error if some other window manager is running */ |
342 /* this causes an error if some other window manager is running */ |
343 XSelectInput(dpy, DefaultRootWindow(dpy), SubstructureRedirectMask); |
343 XSelectInput(dpy, DefaultRootWindow(dpy), SubstructureRedirectMask); |
344 XSync(dpy, False); |
344 XSync(dpy, False); |
345 if(otherwm) |
345 if(otherwm) |
346 die("dwm: another window manager is already running\n"); |
346 die("dwm: another window manager is already running\n"); |
347 XSetErrorHandler(NULL); |
347 XSetErrorHandler(xerror); |
348 xerrorxlib = XSetErrorHandler(xerror); |
|
349 XSync(dpy, False); |
348 XSync(dpy, False); |
350 } |
349 } |
351 |
350 |
352 void |
351 void |
353 cleanup(void) { |
352 cleanup(void) { |
1623 c->maxa = (float)size.max_aspect.x / (float)size.max_aspect.y; |
1622 c->maxa = (float)size.max_aspect.x / (float)size.max_aspect.y; |
1624 } |
1623 } |
1625 else |
1624 else |
1626 c->maxa = c->mina = 0.0; |
1625 c->maxa = c->mina = 0.0; |
1627 c->isfixed = (c->maxw && c->minw && c->maxh && c->minh |
1626 c->isfixed = (c->maxw && c->minw && c->maxh && c->minh |
1628 && c->maxw == c->minw && c->maxh == c->minh); |
1627 && c->maxw == c->minw && c->maxh == c->minh); |
1629 } |
1628 } |
1630 |
1629 |
1631 void |
1630 void |
1632 updatetitle(Client *c) { |
1631 updatetitle(Client *c) { |
1633 if(!gettextprop(c->win, netatom[NetWMName], c->name, sizeof c->name)) |
1632 if(!gettextprop(c->win, netatom[NetWMName], c->name, sizeof c->name)) |