applied Evil_Bobs cleanup patch
This commit is contained in:
parent
6784429c3c
commit
22d8818850
16
dwm.c
16
dwm.c
|
@ -1542,8 +1542,8 @@ setup(void) {
|
||||||
wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False);
|
wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False);
|
||||||
wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
|
wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
|
||||||
wmatom[WMState] = XInternAtom(dpy, "WM_STATE", False);
|
wmatom[WMState] = XInternAtom(dpy, "WM_STATE", False);
|
||||||
netatom[NetActiveWindow] = XInternAtom(dpy, "_NET_ACTIVE_WINDOW", False);
|
|
||||||
wmatom[WMTakeFocus] = XInternAtom(dpy, "WM_TAKE_FOCUS", False);
|
wmatom[WMTakeFocus] = XInternAtom(dpy, "WM_TAKE_FOCUS", False);
|
||||||
|
netatom[NetActiveWindow] = XInternAtom(dpy, "_NET_ACTIVE_WINDOW", False);
|
||||||
netatom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False);
|
netatom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False);
|
||||||
netatom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False);
|
netatom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False);
|
||||||
netatom[NetWMState] = XInternAtom(dpy, "_NET_WM_STATE", False);
|
netatom[NetWMState] = XInternAtom(dpy, "_NET_WM_STATE", False);
|
||||||
|
@ -1612,7 +1612,7 @@ spawn(const Arg *arg) {
|
||||||
execvp(((char **)arg->v)[0], (char **)arg->v);
|
execvp(((char **)arg->v)[0], (char **)arg->v);
|
||||||
fprintf(stderr, "dwm: execvp %s", ((char **)arg->v)[0]);
|
fprintf(stderr, "dwm: execvp %s", ((char **)arg->v)[0]);
|
||||||
perror(" failed");
|
perror(" failed");
|
||||||
exit(0);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1760,11 +1760,11 @@ unmapnotify(XEvent *e) {
|
||||||
void
|
void
|
||||||
updatebars(void) {
|
updatebars(void) {
|
||||||
Monitor *m;
|
Monitor *m;
|
||||||
XSetWindowAttributes wa;
|
XSetWindowAttributes wa = {
|
||||||
|
.override_redirect = True,
|
||||||
wa.override_redirect = True;
|
.background_pixmap = ParentRelative,
|
||||||
wa.background_pixmap = ParentRelative;
|
.event_mask = ButtonPressMask|ExposureMask
|
||||||
wa.event_mask = ButtonPressMask|ExposureMask;
|
};
|
||||||
for(m = mons; m; m = m->next) {
|
for(m = mons; m; m = m->next) {
|
||||||
m->barwin = XCreateWindow(dpy, root, m->wx, m->by, m->ww, bh, 0, DefaultDepth(dpy, screen),
|
m->barwin = XCreateWindow(dpy, root, m->wx, m->by, m->ww, bh, 0, DefaultDepth(dpy, screen),
|
||||||
CopyFromParent, DefaultVisual(dpy, screen),
|
CopyFromParent, DefaultVisual(dpy, screen),
|
||||||
|
@ -2069,5 +2069,5 @@ main(int argc, char *argv[]) {
|
||||||
run();
|
run();
|
||||||
cleanup();
|
cleanup();
|
||||||
XCloseDisplay(dpy);
|
XCloseDisplay(dpy);
|
||||||
return 0;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue