9 #include <sys/select.h> |
9 #include <sys/select.h> |
10 #include <X11/cursorfont.h> |
10 #include <X11/cursorfont.h> |
11 #include <X11/keysym.h> |
11 #include <X11/keysym.h> |
12 #include <X11/Xatom.h> |
12 #include <X11/Xatom.h> |
13 #include <X11/Xproto.h> |
13 #include <X11/Xproto.h> |
|
14 #include <X11/Xutil.h> |
14 |
15 |
15 /* extern */ |
16 /* extern */ |
16 |
17 |
17 char stext[256]; |
18 char stext[256]; |
18 int screen, sx, sy, sw, sh, wax, way, waw, wah; |
19 int screen, sx, sy, sw, sh, wax, way, waw, wah; |
19 unsigned int bh, ntags; |
20 unsigned int bh, ntags; |
20 unsigned int bpos = BARPOS; |
21 unsigned int bpos = BARPOS; |
21 unsigned int numlockmask = 0; |
22 unsigned int numlockmask = 0; |
22 Atom dwmtags, wmatom[WMLast], netatom[NetLast]; |
23 Atom dwmconfig, wmatom[WMLast], netatom[NetLast]; |
23 Bool *seltag; |
24 Bool *seltag; |
24 Bool selscreen = True; |
25 Bool selscreen = True; |
25 Client *clients = NULL; |
26 Client *clients = NULL; |
26 Client *sel = NULL; |
27 Client *sel = NULL; |
27 Client *stack = NULL; |
28 Client *stack = NULL; |
137 Window w; |
138 Window w; |
138 XModifierKeymap *modmap; |
139 XModifierKeymap *modmap; |
139 XSetWindowAttributes wa; |
140 XSetWindowAttributes wa; |
140 |
141 |
141 /* init atoms */ |
142 /* init atoms */ |
142 dwmtags = XInternAtom(dpy, "__DWM_TAGS", False); |
143 dwmconfig = XInternAtom(dpy, "_DWM_CONFIG", False); |
143 wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False); |
144 wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False); |
144 wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False); |
145 wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False); |
145 wmatom[WMState] = XInternAtom(dpy, "WM_STATE", False); |
146 wmatom[WMState] = XInternAtom(dpy, "WM_STATE", False); |
146 netatom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False); |
147 netatom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False); |
147 netatom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False); |
148 netatom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False); |