Commit 8a8b795
client.c
@@ -14,7 +14,7 @@ update_client_name(Client *c)
{
XTextProperty name;
int n;
- char **list = 0;
+ char **list = NULL;
name.nitems = 0;
c->name[0] = 0;
draw.c
@@ -116,7 +116,7 @@ loadfont(Display *dpy, Fnt *font, const char *fontstr)
char **missing, *def;
int n;
- missing = 0;
+ missing = NULL;
def = "?";
setlocale(LC_ALL, "");
if(font->set)
@@ -128,7 +128,7 @@ loadfont(Display *dpy, Fnt *font, const char *fontstr)
XFreeStringList(missing);
if(font->set) {
XFreeFontSet(dpy, font->set);
- font->set = 0;
+ font->set = NULL;
}
}
if(font->set) {
@@ -151,7 +151,7 @@ loadfont(Display *dpy, Fnt *font, const char *fontstr)
else {
if(font->xfont)
XFreeFont(dpy, font->xfont);
- font->xfont = 0;
+ font->xfont = NULL;
font->xfont = XLoadQueryFont(dpy, fontstr);
if (!font->xfont)
font->xfont = XLoadQueryFont(dpy, "fixed");
wm.c
@@ -20,8 +20,9 @@ Atom wm_atom[WMLast], net_atom[NetLast];
Cursor cursor[CurLast];
XRectangle rect, barrect;
Bool running = True;
+Client *client = NULL;
-char *bartext;
+char *bartext, tag[256];
int screen, sel_screen;
unsigned int lock_mask, numlock_mask;
@@ -74,12 +75,11 @@ win_property(Window w, Atom a, Atom t, long l, unsigned char **prop)
status = XGetWindowProperty(dpy, w, a, 0L, l, False, t, &real, &format,
&res, &extra, prop);
- if(status != Success || *prop == 0) {
+ if(status != Success || *prop == NULL) {
return 0;
}
- if(res == 0) {
+ if(res == 0)
free((void *) *prop);
- }
return res;
}
@@ -264,7 +264,7 @@ main(int argc, char *argv[])
barrect.width, barrect.height, 0, DefaultDepth(dpy, screen),
CopyFromParent, DefaultVisual(dpy, screen),
CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa);
- bartext = 0;
+ bartext = NULL;
XDefineCursor(dpy, barwin, cursor[CurNormal]);
XMapRaised(dpy, barwin);
draw_bar();
wm.h
@@ -20,11 +20,10 @@ enum { CurNormal, CurResize, CurMove, CurInput, CurLast };
enum { RFloat, RGrid, RLast };
typedef struct Client Client;
-typedef struct Tag Tag;
struct Client {
- Tag *tag;
char name[256];
+ char tag[256];
int proto;
unsigned int border;
Bool fixedsize;
@@ -37,27 +36,21 @@ struct Client {
Client *snext;
};
-struct Tag {
- char name[256];
- Client *stack;
- XRectangle r;
- Tag *next;
- Tag *cnext;
-};
-
extern Display *dpy;
extern Window root, barwin;
extern Atom wm_atom[WMLast], net_atom[NetLast];
extern Cursor cursor[CurLast];
extern XRectangle rect, barrect;
extern Bool running;
+extern Bool grid;
extern void (*handler[LASTEvent]) (XEvent *);
extern int screen, sel_screen;
extern unsigned int lock_mask, numlock_mask;
-extern char *bartext;
+extern char *bartext, tag[256];
extern Brush brush;
+extern Client *client;
/* bar.c */
extern void draw_bar();