summaryrefslogtreecommitdiffstats
path: root/wm.c
diff options
context:
space:
mode:
Diffstat (limited to 'wm.c')
-rw-r--r--wm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/wm.c b/wm.c
index 843aaac..a4caf64 100644
--- a/wm.c
+++ b/wm.c
@@ -20,8 +20,9 @@ Atom wm_atom[WMLast], net_atom[NetLast];
20Cursor cursor[CurLast]; 20Cursor cursor[CurLast];
21XRectangle rect, barrect; 21XRectangle rect, barrect;
22Bool running = True; 22Bool running = True;
23Client *client = NULL;
23 24
24char *bartext; 25char *bartext, tag[256];
25int screen, sel_screen; 26int screen, sel_screen;
26unsigned int lock_mask, numlock_mask; 27unsigned int lock_mask, numlock_mask;
27 28
@@ -74,12 +75,11 @@ win_property(Window w, Atom a, Atom t, long l, unsigned char **prop)
74 status = XGetWindowProperty(dpy, w, a, 0L, l, False, t, &real, &format, 75 status = XGetWindowProperty(dpy, w, a, 0L, l, False, t, &real, &format,
75 &res, &extra, prop); 76 &res, &extra, prop);
76 77
77 if(status != Success || *prop == 0) { 78 if(status != Success || *prop == NULL) {
78 return 0; 79 return 0;
79 } 80 }
80 if(res == 0) { 81 if(res == 0)
81 free((void *) *prop); 82 free((void *) *prop);
82 }
83 return res; 83 return res;
84} 84}
85 85
@@ -264,7 +264,7 @@ main(int argc, char *argv[])
264 barrect.width, barrect.height, 0, DefaultDepth(dpy, screen), 264 barrect.width, barrect.height, 0, DefaultDepth(dpy, screen),
265 CopyFromParent, DefaultVisual(dpy, screen), 265 CopyFromParent, DefaultVisual(dpy, screen),
266 CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa); 266 CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa);
267 bartext = 0; 267 bartext = NULL;
268 XDefineCursor(dpy, barwin, cursor[CurNormal]); 268 XDefineCursor(dpy, barwin, cursor[CurNormal]);
269 XMapRaised(dpy, barwin); 269 XMapRaised(dpy, barwin);
270 draw_bar(); 270 draw_bar();