summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--main.c38
1 files changed, 18 insertions, 20 deletions
diff --git a/main.c b/main.c
index 2d132a5..27e2627 100644
--- a/main.c
+++ b/main.c
@@ -14,26 +14,12 @@
14#include <X11/Xatom.h> 14#include <X11/Xatom.h>
15#include <X11/Xproto.h> 15#include <X11/Xproto.h>
16 16
17Display *dpy;
18Window root, barwin;
19Atom wmatom[WMLast], netatom[NetLast];
20Cursor cursor[CurLast];
21Bool running = True;
22Bool issel = True;
23
24int tsel = Tdev; /* default tag */
25int screen, sx, sy, sw, sh, bx, by, bw, bh, mw;
26char stext[1024];
27 17
28DC dc = {0}; 18/* static */
29Client *clients = NULL;
30Client *sel = NULL;
31 19
32static Bool otherwm; 20static Bool otherwm;
33static int (*xerrorxlib)(Display *, XErrorEvent *); 21static int (*xerrorxlib)(Display *, XErrorEvent *);
34 22
35/* static functions */
36
37static void 23static void
38cleanup() 24cleanup()
39{ 25{
@@ -97,7 +83,20 @@ xerrorstart(Display *dsply, XErrorEvent *ee)
97 return -1; 83 return -1;
98} 84}
99 85
100/* extern functions */ 86/* extern */
87
88char stext[1024];
89int tsel = Tdev; /* default tag */
90int screen, sx, sy, sw, sh, bx, by, bw, bh, mw;
91Atom wmatom[WMLast], netatom[NetLast];
92Bool running = True;
93Bool issel = True;
94Client *clients = NULL;
95Client *sel = NULL;
96Cursor cursor[CurLast];
97Display *dpy;
98DC dc = {0};
99Window root, barwin;
101 100
102int 101int
103getproto(Window w) 102getproto(Window w)
@@ -141,10 +140,9 @@ quit(Arg *arg)
141} 140}
142 141
143/* 142/*
144 * There's no way to check accesses to destroyed windows, thus 143 * There's no way to check accesses to destroyed windows, thus those cases are
145 * those cases are ignored (especially on UnmapNotify's). 144 * ignored (especially on UnmapNotify's). Other types of errors call Xlibs
146 * Other types of errors call Xlib's default error handler, which 145 * default error handler, which calls exit().
147 * calls exit().
148 */ 146 */
149int 147int
150xerror(Display *dpy, XErrorEvent *ee) 148xerror(Display *dpy, XErrorEvent *ee)